Verbose is not Explicit
This is a response to Verbosity published at lesscode.org
From my big fat “compact” Random House dictionary:
Some programming languages are more verbose than others. As Matt Good pointed out, Java is more verbose than Python. That type of verbosity is a bad thing for readability. It’s redundant, tedious, inflated. It causes me to go to sleep. It slows me down. It’s tiring.
The confusion is between verbosity and explicitness. Again from Random House:
andverbosity: the state or quality of being verbose; superfluity of words, wordiness
Syn: …redundancy, turgidity
In fact, my dictionary is verbose, and come to think of it, programmers (and lawyers) tend to be verbose as well. We need to qualify every statement (as if you didn’t already know it), to make sure everyone gets our point exactly as we intended it to be interpreted, so there is zero ambiguity. This tendency toward verbosity can have the effect of causing our readers to fall asleep… WAKE UP! I’m not finishedverbose: characterized by the use of many or too many words; wordy
Syn: …tedious, inflated, turgid…
Explicitness is when I come right out and say it, rather than doing it with black magic behind the scenes. Verbosity, on the other hand, is extra, unneeded, superfluous verbiage–more than is required. As programmers, we should be striving to DO NO MORE THAN IS REQUIRED. Verbosity is bad, explicitness is good. Alex quoted “the other fellow” as saying (emphasis added):explicit: fully and clearly expressed or demonstrated; leaving nothing merely implied…
Syn: express, definite, precise, exact, unambiguous…
That’s just plain wrong. Especially if he meant to say “verbosity”, but I think he was confused and actually meant to say “explicitness”. Verbosity does not guarantee that “everything I need to know is right there”. Instead, it usually means that there is more there than I need, which makes it harder to find what I want. Explicitness, by definition, means that everything is there: “leaving nothing merely implied”.And verbosity makes code easier to read. I donĂt have to know anything to understand the code. Everything I need to know is there in front of me.
I wish I would have thought of the term “explicit”. You nailed it right on the head. I was thinking the same thing. “How can he say that ‘verbosity’ makes things easier to read”. For me verbosity has a bad connotation. It is not something you want other than when you are debugging something.