Hacker News new | ask | show | jobs
by ryandvm 582 days ago
I don't mind an 80 or 100 character limit on code, but it boggles my mind that we're still inserting line breaks in comment blocks. Like, if you can't figure out how to get your editor to line-wrap comments then you're in the wrong business.
2 comments

There's still reason to use line breaks, because many editors / viewers will wrap at the viewport width, not earlier, which is not always desirable. Different content "wants" to be different max widths.

For instance, I think prose is hard to read when you have to scan long horizontal distances from line to line.

However, code often has indentation, syntax, and chains (e.g. nested property access) that take up a lot of width before the actual information is presented, so width is more helpful.

Code is not only used in modern editors. Sometimes it is used in HTML, sometimes it is used in emailed patches, sometimes it is read as plaintext in some other context, it may be read or manipulated over a remote shell session in a terminal that has only rudimentary tools available during a production problem. There are many contexts where source code should be cleanly and clearly formatted and comprehensible without assistance from modern GUIs.