Hacker News new | past | comments | ask | show | jobs | submit login

I'm sympathetic that Python is relatively not a great language, but IMHO an 80-character line limit is quite reasonable. It's easier to read on smaller screens, easier to view side-by-side diffs, and tends to force you to break up your code more.

That said, this shouldn't be a lint, it should just be enforced by a formatting tool as a format-on-save setting. It just destroys all the wasted arguments about formatting and the wasted time trying to manually line up code.




I'd also add that while perhaps a bit on the pessimistic side, I tend to view the 80 char rule / limit not as an ancient hardware limitation of monitors, but as a limitation of our eyes and visual processing circuitry. There is a reason why newspapers and well laid-out websites don't have 300 char width lines. Those are physically harder to read, whether we want to admit it or not, as our eyes lose track of the flow to the next line.

I'm all for decreasing unnecessary cognitive load, there should be quite enough of that without us adding more by accident.


Why not take this reasoning one step further and have Hacker news impose an 80 character line wrap limit?

If you've ever had to deal with this in an email client, you can quickly see that 80 is undershooting it in the modern era.


Funny. I preferentially read HN on my phone which has probably what looks like around a 80 char limit. It makes it really comfortable to read.


Do you do code reviews on your phone too?


Maybe I do. What's it to you?


I don't understand–I quite enjoy reading a well-formatted plaintext email that sticks inside an 80-character line width. Any mail client worth its salt should be able to display that.


> as a limitation of our eyes and visual processing circuitry.

If so, then why not put the limit on line length without trailing whitespace? Because it makes no sense that with indentation I should lose available characters.

> There is a reason why newspapers and well laid-out websites don't have 300 char width lines.

Yes, and the reason is, print and transportation are expensive, so newspapers found a way to cram as much text as possible in as few pages as possible. You don't see them replicating this style on-line, and neither you see it in magazines that are priced well above their production & distribution costs.

The reason "well laid-out websites" don't have 300 char width lines is because web development is one large cargo culting fest of design. 300 may be a bit much due to actual physical length, but your comment has 200+ on my machine and reads just fine.

I don't buy these "80 chars / short lines and ridiculous font sizes are optimal for the eyes" arguments. They fly in the face of my daily experience.


I enjoy printing code out, going outside, and reading it.




Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: