News for hackers. Stuff that matters.
Re:Fundamentals of Optimal Code Style by okareaman on Thursday March 25, 2021 @04:17PM (#26584856)
Linus Torvalds disagrees about line lengths for what it's worth: https://news.ycombinator.com/item?id=23356607
Re:Fundamentals of Optimal Code Style by rudedogg on Thursday March 25, 2021 @05:42PM (#26585797)
I find it difficult to have meaningful variable/function names and stay under 80 characters.

Plus, with code completion (especially in a strongly typed language) it’s no longer necessary to optimize for fewer keystrokes.

Re:Fundamentals of Optimal Code Style by smoe on Thursday March 25, 2021 @06:52PM (#26586645)
I do think having lines around 80 characters makes it more fluent to read code. It is not about saving keystrokes or to be able to do split screen even on smaller screens.

But what has worked better for me is to have it as a soft not a hard rule. Better to have some lines go over a bit than having awkward breaks that make it harder to read

Re:Fundamentals of Optimal Code Style by qayxc on Thursday March 25, 2021 @07:56PM (#26587224)
The main problem is that code isn't like other text.

Strict rules are BS because they count characters that don't contribute to the actual content that you're parsing.

This includes punctuation and especially whitespace. I tend to keep lines short in general, too, but strict limits just for the sake of it are indeed more hinderance that helpful.

Re:Fundamentals of Optimal Code Style by m33k44 on Thursday March 25, 2021 @05:25PM (#26585601)
At one point he use to be fanatic about it. The VIM configuration line specific to linux kernel development originated from that insistance on 80 chars per line in the early days.
Re:Fundamentals of Optimal Code Style by kmonsen on Thursday March 25, 2021 @10:35PM (#26588235)
It made a lot more sense back then as well.
Re:Fundamentals of Optimal Code Style by cryptonector on Thursday March 25, 2021 @09:49PM (#26587977)
Count me in. I'm pretty tired of 80 (79) column limits.
Re:Fundamentals of Optimal Code Style by nemoniac on Friday March 26, 2021 @03:59AM (#26589733)
Interestingly the text (not code) of Torvalds' posting discussed there is formatted at 70 characters wide.