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

I think templates are fine as long as they're not abused. Unfortunately, since C++ templates are Turing complete, people will inevitably go overboard with them.

My personal rule is to never nest more than two templates. You can have a template inside a template, but anything deeper than that should be refactored or at least split up into typedefs for readability.



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

Search: