Comment

Comment by _slyo

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.

parent _slyo 5 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton