C++ Templates
Discussions center on C++ templates for generic programming and metaprogramming, including their power, error messages, comparisons to generics in other languages, and whether they solve or create problems.
Activity Over Time
Top Contributors
Keywords
Sample Comments
It gives generic programming. C++ templates aren't the only possible implementation.
Just use C++ with just templates?
You don't need a new programming language for something that C++ templates with integer constants give you for free.
Templates are a solution for a problem that c++ themselves created
Just look at any template heavy c++ library.
If ever I heard a reason to use C++ templates, this is it.
Are there languages that have powerful template metaprogramming that are much faster to compile?
I am not up to date with latest C++ developments but I wonder if there is something you could build with template magic that would provide this in C++.
It is not necessarily so for C++, thanks to its templates.
C++ doesn't have generics, it has templates, which are effectively a syntax-constrained form of macros. That's why it lends itself to abuse (or creative use, depending on your take on macros).