C++ templates
C++'s generic programming mechanism. Write code parameterized by types: template<typename T> class Vector { T data; ... };. Bjarne Stroustrup, 1990.
Notoriously complicated error messages ("template error vomit"). SFINAE (Substitution Failure Is Not An Error) is the trick for partial specialization. Template metaprogramming = compute values at compile time (classic: Factorial<5>::value). Concepts (C++20) standardize template constraints → much cleaner error messages. Monomorphization-based (compiles different code per instantiated type) ⇒ fast runtime but larger binaries. STL (Standard Template Library) is built entirely on templates: std::vector, std::map, <algorithm>.