Perhaps it’s just that I’ve been buying and reading more, but I do have the impression that the publishing world has now accepted that C++ has regained some popularity and with the 3 year release train there is also both a lot of new material to learn and demand for information.
Whilst there’s a lot of coverage of the basics and the language, there aren’t too many books that cover guidelines and design. That’s probably because telling people what to do is easier than explaining why and not all authors are Scott Meyers.
As the title suggests, this is a book about design. More precisely it’s in the mould of Design Patterns: Elements of Reusable Object-Oriented Software, Gamma, Helm, Johnson and Vlissides (commonly known as the Gang of Four or GoF book). The GoF book was published way back in October 1994, before C++ was even an ISO standard. Some of the examples are in Java, and the style is very much Object-Oriented - as they said in their subtitle. It would probably be useful to have read the Gof book and to be familiar with ‘design patterns’ in general if you are considering reading C++ Software Design.
That puts this book in the middle of the design scale of software between the implementation nuts and bolts and the top level architectural design.
Iglberger has reprised a substantial chunk of the original design patterns and reworked them for modern C++. That means less objects and inheritance and more templates. Most, but not all, were part of the GoF book. As such these techniques often serve as the glue that holds components together (like how modules like overlays, filters and cropping work together in an image editor).
The first 3 chapters cover basics and theory. To be honest I found them a bit boring and acronym-heavy (LSP DRY ISP SRP OCP and probably more). I’d rather be looking at assembler than UML so that might be just my personal taste.
Then comes the bulk of the book, covering 11 design patterns, most of which are classic GoF patterns but some (Type Erasure, CRTP, External Polymorphism) aren’t. Not that non-GoF patterns are any less interesting or important.
The patterns are covered in depth with a full discussion of all of the pros and cons. The pros and cons include dependencies (bad), code complexity and performance. Furthermore they are also often shown with several different implementation techniques. Typically that will be the reference semantics OO version and then a value semantics template version. I found that interesting and well done as value semantics is becoming more popular. As with most such design choices there is often a trade-off between the various attributes.
The last couple of chapters cover singletons (though they are described as an implementation pattern to be used sparingly rather than as a design pattern) and the final chapter inciting the reader to carry on exploring the world of ‘design patterns’.
The book is well copy-edited and I only noticed a few small errors. The writing style wasn’t to my liking - Iglberger uses a lot of rhetorical imagined dialogue with the reader like “I know what you’re thinking”. Rather than engaging my attention I found that more of a distraction that slowed my reading.