by soyiuz · 10y ago · 0 comments
if [ "$var" = "find" ]; then
echo "found"
fi
Is far more readable than its equivalent [ "$var" = "find" ] && echo "found"
I understand the upside of readability. What does concision get me?most programmers seems to prefer verbosity.
however in my case verbosity slows me down.
That's a bad definition. Readability should be: "code easier to read", not just "less code to read" -- since less is not always easier and can even be much harder.
Case in point: the J language.
Or "magic" constructs that do too much under the scenes and don't let you immediately understand what a part of code is doing.
If that's the only criterion, then the parent just followed the logic. Or let's put it another way, if the definition of readability can't survive taking it to the extreme, it is flawed.
Concision gets you fewer places to possibly have a bug, and fewer things to possibly miss/misunderstand.