I loooooooove templates. I don't use them often, and I don't think people should use them often. But compare that to operator overloading, where I both hate them and think you should be fired for using them ever. But I think the STL is a testament to how powerful they really are. There is no other language that has a generic programming model as powerful and efficient as C++.
STL is written by sane people...
I don't have issues with the concept of templates.
I have issues with how they were implemented (although there probably weren't better solutions). Mainly
- how the syntax become sometimes a mindfuck because of those
- the fact that headers contains code (nearly all the code sometimes), which is heresy to me
- error messages are just awful, even for a misplaced bracket
- plently of warnings won't trigger... compare signed and unsigned in C, you'll get a warning, but use unsigned in min<int> and watch the compiler believe it's a predicate and stay silent
- optimization will be awful because the compiler don't know what you're after, and performance is a huge reason of using C
etc.
They're nicer in D, and polymorphism can be great in ML, but I feel like sometimes playing with lisp macros where I shouldn't
You use them because they're useful, but...
And STL is really nice, but it's API isn't that great...
Also, I wonder if I really needed turing-completeness at compilation time ^_^