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

I think the usual rule is that the size of a variable's name should be a function of the size of the scope in which it's visible: If it's a global, it should have a long, descriptive name, perhaps with_underscores or CamelCase or similar. If it's a class member, abbreviate it some. Function locals get even shorter names, and loop indices or temporary variables only used in one part of the function can be single-character.


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

Search: