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

That's because [1]

  char* foo, bar;
doesn't mean what one would expect it to mean.

[1] as per Rule of Maximum Astonishment.



I find that

char* foo = NULL;

char bar = 0;

are preferable. Is there any reason one would want to smash N declarations into one?


I prefer that as well, but because the other option is possible and sometimes used, a few prefer to put the star close to the name as to avoid mistakes.




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

Search: