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

In the conclusion the author says he considers T f() to be prettier than T f(void). I personally prefer the look of T f(void) to T f(); the former is explicit to both the programmer and the compiler that this function is not supposed to take any arguments. If I can cause the compiler to not be helpfully clever when it doesn't need to be, as well as make it clear to my future selves, or any other poor soul condemned to read my code what my actual intention was, I see that as a Good Thing.


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

Search: