2 ms·
> Variable names should be short, and in my controversial opinion, as short as possible. Long variable names actually make code more difficult to understand, no
by nailer 6y ago
> Variable names should be short, and in my controversial opinion, as short as possible. Long variable names actually make code more difficult to understand, not easier. Rob Pike talks about it in the Practice of Programming, and it's a common tenant among APL/J/K programmers as well.
https://en.wikipedia.org/wiki/Argument_from_authority https://en.wikipedia.org/wiki/Argument_from_authority
But as short as possible doesn't mean:
> Make your variable names abbrevations or acronyms, like instead of 'convertInt', call it 'ci'.
'ci' has no meaning. It is not a possible name for 'convertInt' because 'ci' is not a name. I have to visit the function to determine what 'ci'-ing something does. In 'ci', in turn, I'll have to deal with more minified code.