4 ms·
Actually what you need to recognize are expressions, and expressions with short variable names are much easier to recognize. For example, if I write: theDepe
by magoghm 6y ago
Actually what you need to recognize are expressions, and expressions with short variable names are much easier to recognize. For example, if I write:
theDependentVariable = theCoefficient * theIndependentVariable + theIntercept
it is much harder to recognize than if I write:
y = a*x + b
So, longer variable names might be "autodocumenting" but they also make code harder to read.
- erik_seaberg 6y agoYeah, letters don’t have much of a cost, but extra words do, which is why people complain so much about needing to plow through SimpleBeanFactoryAwareAspectInstanceFactories.
- cgriswald 6y agoI think you're offering a very particular case with a well-known idiomatic presentation and trying to apply it to the general case. In this case a, b, x, and y are both letters and good variable names for their purpose because of their long, familiar use in mathematics. But calling your main GUI window "m", your data "d", and your server connection object "b" doesn't make for readable code.