5 ms·
concision gets me less code to read. that's how i define "readability". but if forum commments are any indication, i know my preferences do not follow the norm
by pwd_mkdb 10y ago
concision gets me less code to read. that's how i define "readability". but if forum commments are any indication, i know my preferences do not follow the norm.
most programmers seems to prefer verbosity.
however in my case verbosity slows me down.
- eximius 10y agoSomething very 'readable' is something read and understood easily. Python is considered very readable, for example. I would not consider Python verbose. C++ Template programming is verbose and it is not particularly pleasant to read. At the same, APL or J or something can be very concise and is largely unreadable to most. Notice how Python, which is considered by most to be readable, is somewhere in between.
- vacri 10y agoIf the command is as short as "echo 'found'", then that one-liner is easier, but if it's a nice, lengthy command, I find the 'full' version easier to read.
- teamhappy 10y agoI define readability the same way the Linux kernel style guide does: Avoid tricky expressions.
- wodenokoto 10y agoBy that logic you find minified javascript easier to read too.
- nikita2206 10y agoThis is not @pwd_mkdb's logic though, it's you who brought this to the extreme.
- coldtea 10y agoNot really. @pwd_mkdb said he defines readability as "less code to read". 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.
- cgriswald 10y ago> If that's the only criterion, then the parent just followed the logic. wodenokoto offered up some reductio ad absurdum and you are calling it logic. It was not the only criterion. It was the only criterion that was explicit. There are implied criterion and most of us understand what pwd_mkdb means even if we don't necessarily agree with him.
- coldtea 10y ago>It was the only criterion that was explicit. Well, even in itself, it is wrong. It's not just that other criteria apply too -- it's that it alone needs several caveats, as succinctness is quite orthogonal to readability (e.g. sometimes even needless boilerplate syntax that the compiler could infer by itself, make for better readability when present).
- cgriswald 10y ago> Well, even in itself, it is wrong. I am not in disagreement with you about whether it is wrong, I am in disagreement with you about why it is wrong. The counter argument was that Y is wrong and X is Y, therefore X is wrong. While this is a valid argument, it is not sound, because X is not Y. > ... succinctness is quite orthogonal to readability ... There is a relationship between succinctness and readability. The relationship is definitely not directly proportional as the pwd_mkdb's post could be read to imply, but to say there is no relationship between the two is flatly absurd.
- coldtea 10y ago>concision gets me less code to read. that's how i define "readability". 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.
- mikeash 10y agoIs ts cmmt esr t rd?