alexandrescu-modern-cpp-design
Installation
SKILL.md
Andrei Alexandrescu Style Guide
Overview
Andrei Alexandrescu's "Modern C++ Design" revolutionized how we think about C++ templates. His work on Loki library and policy-based design showed that templates are not just for containers—they're a compile-time programming language.
Core Philosophy
"C++ templates are Turing-complete. Use this power wisely."
"Policy-based design: assemble types from interchangeable parts."
Alexandrescu believes in pushing computation to compile time and using the type system as a design tool, not just a safety mechanism.
Design Principles
-
Policy-Based Design: Build classes from interchangeable policy classes that customize behavior without inheritance overhead.
-
Compile-Time over Runtime: What can be computed at compile time should be.