3 ms·
Why does it matter if a variable name is longer than it should be? As long as the code is legible, who cares? I assume the author isn't saying that all variab
by sdh 17y ago
Why does it matter if a variable name is longer than it should be? As long as the code is legible, who cares?
I assume the author isn't saying that all variables should be named like "i" and "j" (and those examples are bad ones since they are well-known conventions), but that a variable shouldn't be named any longer than is needed to convey meaning.
Ok. Why even make this point? Programmers should err on the side of too long rather than too short. And, whenever possible, use the conventions of the language in favor of their personal philosophy.