3 ms·
Man of course there are english passages that are too verbose to read. Everyone knows this. This is not what I'm talking about. I am saying the level of NORMAL
by nendroid 6y ago
Man of course there are english passages that are too verbose to read. Everyone knows this. This is not what I'm talking about. I am saying the level of NORMAL verbosity in the english language is already illogically considered to be too verbose for programming. There is an irrational dichotomy here and you can't see it.
You took shakespeare and upgraded it to be more verbose than normal. That example does not disprove my point because you misunderstood.
Let's start with a normal example. My original Box example. Step by step. It is in your opinion that the Box example I created is waaay to verbose. My claim is that IF I translated my Box example into the English language it will not be considered Verbose by the average english speaker. Take this english phrase:
The measurement of the left bottom side of the box is 26 centimeters. The right upper side of the box is 10 centimeters.
We can both agree the level of clutter above is Normal for the English language. I can shortcut it though if you want.
Box: x is 26, y is 10.
The second example is the shorthand we tend to use in programming. We think it's fine in programming but it's not fine in English.
struct Box {
x = 26,
y = 10
}
English in 99% of all cases, we prefer way more verbose syntax than programming, even just by the virtue of grammatical words like "the" "and" or "of". My argument is to move programming more in the direction normal english verbosity. That's all. Add more meaning to your variable names, spell out the purpose of the name.
I'm not advocating insane levels of obvious of detail here. I'm obviously not saying we do this:
variableThatCanBeAddedToOtherNumbers = 22
which is what your example is accusing me of.
I'm saying fill in the variable name with necessary details that the reader would need to know. Fill in details in your variable name that you would put in documentation to help the reader understand. This is what they call self-documenting code. Additionally there is no need to cut details for elegance, it is pointless to use an abbreviation if that abbreviation has a probability to be misinterpreted or confusing.
UpperLeftSideInCentimeters is infinitely better than x as x can lead to a ton of confusion. Either way nobody will call something "x" in english they'd choose the more verbose and informative way despite the "exhaustion" in reading. On average nobody complains about English so the same can be said if we did it in programming.
Additionally programming will never approach the verbosity of English. I'm just saying programming needs to be a bit more verbose and not excessively more verbose than English itself.