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

"if you want to generate subtle programmer errors, then templates is definitely the way to go."

Please indicate how so. I cannot think of ways that make templates more prone to programmer error than, let's say, str_xxx functions for which the programmer needs to allocate extra room for a \0 (or not, depending on which function you use...). Those types of C idiosyncrasies cause much more mistakes than any inadvertent template overload ever could.



agreed on str...(), but this is not semantic, is broken lib that is hard to update for backward compatibility issues, so in some way it is not a matter of the language.


Fair enough, but I'm still interested in examples of subtle programmer errors with templates.




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

Search: