2 ms·
"But since the punch card went out of fashion a while ago and bits are nearly free (screen width otoh is not) it doesn't hurt to name all your variables descrip
by joe_the_user 16y ago
"But since the punch card went out of fashion a while ago and bits are nearly free (screen width otoh is not) it doesn't hurt to name all your variables descriptively."
The bits are free but there's still a mental cost to reading them.
I once rigorously used long-names for everything. But now, I'm working on an algorithm where the operations are what matter, short names actually help me grasp everything at once. As you say, these would be short local variable. Having i, j, k be the standard indexing variable can make some situations clearer.
- jacquesm 16y agoSure, that's fine, those are pretty close to universal. It would actually be less readable if you suddenly started to use long names for loop variables and such.