by KaeseEs · 15y ago · 0 comments
buf[thisVariableIsTheLoopIndex] = foo(...);
is no more obvious than buf[i] = foo(...);
and indeed is more likely to slow the programmer down by killing his train of thought and mental flow.ConcurrentHashMap<K, V>, on the other hand, says everything it needs to in the name. As does NSMutableArray, and so on. Apples and oranges, here.
The simple rule is that the larger the scope of the variable the longer the name - i.e. the more widely references to the var occur, the further they are from the definition, the more descriptive the name has to be.
Such programs must be a joy to read.
It's one or the other.
He gives a more descriptive names to variables that live for more than a 10 lines or code or so.
And that's way more of a joy than reading a Java sourceful of "indexThatGoesSourceThe2ndArray"