Hacker News new | ask | show | jobs
by logicallee 4499 days ago
Most languages allow you to be quite concise. The best argument for 80 characters might be that it keeps you that way.

A similar thing would happen if technical writing and scientific reports kept the average sentence to 12-15 word sentence averages and tried not to go over 25. Reading comprehension goes up:

http://www.onlinegrammar.com.au/how-many-words-are-too-many-...

It's very similar. Breaking one long sentence into two is the same as breaking nested if and loop statement into several lines, the first just assigning a boolean based on the test. Then the if test just tests the boolean. Reading comprehension goes WAY up.

Look at the top response on this question: https://news.ycombinator.com/item?id=7289087 (the one with several short lines.)

100% comprehension.

1 comments

I just had a quick look at that grammar article. I imagine when people are describing something technical / scientific / difficult to comprehend, it will take more words.
And what is more technical than code?

It's literally logic that will be followed extremely, anally literally. No scientific language gets close to being that literal - normally, you are always going to keep the author's view/point in mind as you read. If you were to accidentally remove a random "not" from scientific writing (as happens), we can usually realize what the author meant. (With rare exceptions, if we are particularly unfamiliar with the topic.)

With code, on the other hand, code doesn't have a "point of view". It will just do whatever you wrote, completely literally. The shorter the expressions, lines, etc, the better.

Code rarely has the ambiguities that spoken languages do.