News for hackers. Stuff that matters.
Re:Esoteric C++ Contest 2018 by mianos on Saturday March 23, 2019 @11:37PM (#19474108)
Yes I agree. I would not have been so down-voted so much if I had said the use of templates in the std:: libraries and some others, not all, is fantastic. But, the use of templates to make generic code when it does not need to be leads to the same functionality as specialised classes with longer compile times and obfuscation.
Re:Esoteric C++ Contest 2018 by llukas on Sunday March 24, 2019 @03:47AM (#19475027)
I agree that putting templates where they not belong causes problems (even more than just longer compile times and obfuscation).

However, properly designed templates with enough attention put into exposing functionality beat non-templated approaches right off the bat.

Example: http://eigen.tuxfamily.org/dox/TopicInsideEigenExample.html