Top critical review
Clever, but of very limited utility.
27 January 2010
Modern C++ Design builds on some of the ideas presented in the classic Design Patterns book, and attempts to improve them specifically for C++. The examples fail to make a case for preferring Alexandrescu's patterns over the originals or other alternatives - while they are a clever use (some would say misuse) of templates, they result in unreadable, unmaintainable code. It's therefore quite disconcerting to see this book receive a number of glowing, uncritical reviews. Loki (the library that is described in the book), has not become a common tool for C++ programmers in the years since 2001 when one of the reviews on this page predicted it would. Instead, C++ programmers, compiler writers and standards committees have struggled to make templates usable for anything more than "containers of x". Perhaps that's where the experimentation should have ended, and we may have got an elegant library rather than the half baked Standard Template Library we have now.