C++20 lets values enter the type system. This is the gateway to dependent types — Pi types, Sigma types, and the calculus of constructions. The compiler becomes a staged computation engine.
Posts tagged “constexpr” (6)
The moment you intern a style, comparison becomes integer equality. The moment you cache the transition between two styles, rendering becomes a hash table lookup. This is where Claude Code's renderer goes from fast to unreasonably fast.
constexpr started as a way to mark simple constants. Then it grew. And grew. Now it's an entire execution engine inside the compiler, running real algorithms with loops, branches, allocations, and exceptions.
C++ isn't one language. It's two. One runs on your machine. The other runs inside the compiler. This series teaches the second one.
How Loom encodes routes as non-type template parameters, analyzes patterns at compile time, and generates an optimal dispatch chain with zero runtime overhead.
The best code is code that runs before your program starts. constexpr makes the compiler your runtime.