Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Discovering modern C++
Gottschling P., Addison-Wesley Professional, Boston, MA, 2021. 576 pp.  Type: Book (978-0-136677-64-2)
Date Reviewed: Mar 11 2022

This textbook is on C++, a general-purpose programming language. It describes various language constructs and modern versions of the language and includes many examples in the form of code listings. It gives tips for writing efficient and good code. It also provides some details on the C++ standard library and introduces build processes for C++ programs.

The preface motivates readers to learn C++ by explaining why lots of infrastructure code is written in C++. It compares C++ with other programming languages, including C, Python, and Java. Chapter 1 introduces the C++ language, including expressions, statements, and functions: expressions with variables, constants, literals, operators, and function calls; various types of statements, such as assignments, conditionals, and loops; and declaration of functions, parameters in functions, variable scopes, overloading of functions, and so on. Additionally, exception handling, preprocessor macros, and comments are introduced.

The second chapter covers class members. Fields, methods, and their accesses are introduced. Details include constructors, destructors, copies, moves, and operator overloading. Resource management with respect to these constructs are described. Furthermore, the chapter looks at member variables and their initialization, static members, ways of accessing members, and friends. The third chapter is on generic programming. Templates for classes, functions, variables, and variadic templates are described in detail. Related features such as concepts, functors, namespaces, automatic type inferences, lambdas, and so on are also covered.

Chapter 4 is on libraries, with sections on the Standard Template Library (STL), numerics, and concurrency. The description of STL includes containers, iterators, algorithms, and parallelism. The description of numerics includes random number generation facilities, distributions, type traits, complex number computations, and other mathematical utilities. The chapter’s description of concurrency includes some techniques using threads and locks. The last section of the chapter has a list of various third-party libraries, mainly from scientific application domains.

Chapter 5 is on techniques for writing efficient code. Specializations can be achieved by using constants, constant expressions, template expressions, and so on. A separate section on loop unrolling is given, because unrolling helps compilers in parallelizations. The chapter also has a section on how algebras can be expressed in C++ using concept constructs.

The sixth chapter begins by explaining some principles of object-oriented programming. It instructs readers on how to achieve them in the language. It also has a detailed section on castings. The last chapter describes how to solve ordinary partial differential equations with the Runge-Kutta method using C++. It also covers the standard build process and build tools for C++ projects and describes modules in detail.

Appendix A extends all the topics to give useful tips for good programming. Appendix B describes debuggers, memory analysis tools, and some common commands. Appendix C is a quick look at language definitions.

Discovering modern C++ can be used as textbook for any type of course on C++. Sections are marked based on language versions (such as C++11, C++14, C++17, and C++20). Every chapter has exercises. Readers who already have some knowledge of programming will easily understand the code listings. The book also includes a list of references.

Reviewer:  Maulik A. Dave Review #: CR147417
Bookmark and Share
  Reviewer Selected
Featured Reviewer
C++ (D.3.2 ... )
Would you recommend this review?
Other reviews under "C++": Date
Embracing modern C++ safely
Lakos J., Romeo V., Khlebnikov R., Meredith A.,  Addison-Wesley Professional, Boston, MA, 2021. 1376 pp. Type: Book (978-0-137380-35-0)
Apr 5 2022
Modern data mining algorithms in C++ and CUDA C
Masters T.,  Apress, New York, NY, 2020. 228 pp. Type: Book (978-1-484259-87-0)
May 5 2021
Beginning C++17: from novice to professional (5th ed.)
Horton I., Weert P.,  Apress, New York, NY, 2018. 771 pp. Type: Book (978-1-484233-65-8)
Sep 16 2019

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright © 2000-2022 ThinkLoud, Inc.
Terms of Use
| Privacy Policy