Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Which is pretty much anything outside of the STL library's basic usage.


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.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: