Beautiful C++: 30 Core Guidelines... Book Review -- Bartlomiej Filipek
	 This is a book review of “Beautiful C++,” written by two well-known C++ experts and educators: Kate Gregory and Guy Davidson. The book’s unique style gives us a valuable perspective on effective and safe C++ code.
This is a book review of “Beautiful C++,” written by two well-known C++ experts and educators: Kate Gregory and Guy Davidson. The book’s unique style gives us a valuable perspective on effective and safe C++ code.
Beautiful C++: 30 Core Guidelines... Book Review
By Bartlomiej Filipek
From the review:
The book is split into five parts, and each part has six guidelines to help us understand the material more easily.
- Part one: Bikeshedding is bad - how to reduce the number of lines of your code and simplify it. For example, by using use in-class member initializers or avoiding getters and setters.
- Part two: Don’t hurt yourself - how to avoid messy code and minimize complexity. For example, by limiting explicit sharing of variables, proper use of ABI and more.
- Part three: Stop using that - some important bugs and bad C++ code style: singletons, casting away const or unsafe managing the ownership of resources.
- Part four: Use this new thing properly - efficient use of modern C++ style: enum classes, constexpr, templates.
- Part five: Write code well by default - good patterns for your code: type safety, immutable data structures avoiding uninitialized variables, and RAII.
In total, it’s around 300 pages + afterword and index.
If we look at a corresponding guideline like I.3: Avoid singletons you’ll see a short paragraph of introduction, some small example and a short discussion to alternatives. On the other hand, in the book, this guideline consists of 9 pages with unique examples, backstories, alternatives and discussions. The section shows things like:
- Why global objects are bad
- Singleton Design pattern overview
- Static initialization order fiasco
- Hiding singletons and making a namespace rather than a class
- And even how to use constexpr in some cases (
constexpris also covered in other sections)

 A new episode of the series about SObjectizer and message passing:
A new episode of the series about SObjectizer and message passing: In our previous discussion, we explored a task-based while loop employing custom callables that passed copies of themselves to the next iteration, which follows the continuation-passing style used in the Parallel Patterns Library (PPL). In this session, we will implement the same function using a more traditional recursive approach, aiming to simplify the sharing of state between lambda callables in PPL-style programming.
In our previous discussion, we explored a task-based while loop employing custom callables that passed copies of themselves to the next iteration, which follows the continuation-passing style used in the Parallel Patterns Library (PPL). In this session, we will implement the same function using a more traditional recursive approach, aiming to simplify the sharing of state between lambda callables in PPL-style programming. A new episode of the series about SObjectizer and message passing:
A new episode of the series about SObjectizer and message passing: In this post we’ll have a look at new operations added to
In this post we’ll have a look at new operations added to 