|
|
|
|
|
by _slyo
2001 days ago
|
|
Templates are the killer feature of C++. They add incredible power to the language, but also dramatically increase its complexity. Templates are only superficially similar to generics in C#/Java. They are essentially a type-safe, Turing-complete, syntactically-constrained macro system deeply embedded into the grammar of the language. Few other programming languages offer a similar feature. C++ pulled it off with an ISO standard and multiple conformant implementations. Templates are loved by many, but they are a contender (along with UB) for the most hated C++ feature due to complexity. |
|