Verdict: Highly Recommended
I am approaching this book as a not-an-expert C++ programmer who has plenty to learn. Reading this book was an interesting experience – there were things I was a little unsure of in terms of my understanding, things that I strongly agreed with and things that went by without further ado.
The C++ Core Guidelines ( https://github.com/isocpp/CppCoreGuidelines ) are a community effort led by Bjarne Stroustrup and Herb Sutter, with the intent “to help people to use modern C++ effectively”. Previously, this role has been fulfilled by Scott Meyer’s Effective books. In the context of this book, Modern C++ stretches from C++11 through to C++20. This book takes 30 of these core guidelines and examining them in detail, with one guideline per chapter. It is further split up into five sections, each containing 6 chapters:
- Bikeshedding is bad – stop wasting valuable time on trivia.
- Don’t hurt yourself (by writing code that will cause problems later).
- Stop using that (avoiding bad legacy features).
- Use this new thing properly (guidelines on language innovations).
- Write code well by default (writing statically type-safe, leak resistant and easier to maintain code).
Code from the book is available for experimentation using Compiler Explorer - https://godbolt.org/z/cg30-ch0.0 will take you to the main relevant page.
This book reads well, and isn’t too demanding on the reader’s time. It is a beautiful book. Read it.