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

As a maintainer, I both adore and prefer one-letter variable names when appropriate - loop indices for old crufty array index oriented languages, temporary variables that all references can be seen on one page, that sort of thing.


Cool, you sound amazing. I'm tasked with maintaining an old part of the app now and would appreciate hearing how you feel this way


It's just Stockholm syndrome.

a one-letter variable name does communicate "this variable is of no consequence, it works like an index register works in assembly, and you should be able to prove it correct by inspection. Wish it had a "foreach"... "

plus, I read a lot of signals code - filters, tranforms, where the one-letter names are translations from formulae. It's "you can write Fortran in any language" code.

Celebrate the diversity.




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

Search: