C++20 concepts are propositions in intuitionistic logic. Requires-expressions are constructive proofs. Subsumption is modus ponens. This is natural deduction, hiding in your compiler.
Posts tagged “concepts” (5)
Concepts aren't just prettier SFINAE. They're the type system of the compile-time language — named, composable interfaces that tell the compiler (and the reader) what a type must be.
The compile-time language's error messages are notoriously awful. But you can control them — static_assert, concepts, and careful design turn compiler vomit into helpful diagnostics.
Every language needs branching. The compile-time language has four different if statements, each invented in a different decade, each a reaction to the last one's shortcomings.
Before concepts, template errors were a wall of text. Now they're a sentence.