3 ms·
You are repeating an argument you read somewhere, not actually something you believe. No-one sizes their terminals to 80chars. Heck, I don't even remember the l
by sly010 4y ago
You are repeating an argument you read somewhere, not actually something you believe. No-one sizes their terminals to 80chars. Heck, I don't even remember the last time I came across one, maybe other than some BIOS over RS232 (i.e. NOT coding). For the 0% of you who code on a dot matrix printer, please enable line wrapping in your editor and let the rest of the world move on.
I am not saying lines should be arbitrary long, but a 100-120 _soft_ limit would really not hurt anyone and would help code readability a LOT.
p.s. even dot matrix printers support a 100 character mode.
EDIT: long lines only reduce readability for prose. Code is inherently easier to parse for the eye because it has a shape. Unless of course if you f--k up that shape with arbitrary line breaks.
- eadmund 4y ago> You are repeating an argument you read somewhere, not actually something you believe. I think I am a better judge of my beliefs than you are. > No-one sizes their terminals to 80chars. Mine open at 24×80, although to be honest I normally tile them instead. And I much prefer code formatted to be 80 chars wide, with functions that fit within a page or two of text.
- sly010 4y ago> And I much prefer code formatted to be 80 chars wide, with functions that fit within a page or two of text. Wouldn't you agree that largely depends on the code in question? Of course I also "prefer" shorter lines in general, but that relationship is somewhat linear: 81 is not infinitely worse than 80. If the function in question would be more readable with just 1-2 lines that happens to be 83 chars, wouldn't you opt for that over placing some arbitrary closing bracket on the next line? Whether a code is more readable (for a human) should really not be decided by an arbitrary technical limit from 50 years ago. We have code reviews for that. btw, as far as I know the linux kernel has a _recommended_ 100 char maximum now.
- skirmish 4y agoAnd then you get Go readability reviewers enforcing a single letter (!) variable names so that everything fits in 80 columns. Do you prefer that?