Re:Linus on Line Breaks (2020)
by nomercy400 on Sunday November 28, 2021 @04:14PM
(#29373107)
Thank you. I was looking for this.
I don't care if a line needs to be 180 chars if it starts with log.debug. Just like searching, I read my code globally based on the first 10-20 chars. If I need details on a line, I'll read the whole line.
I do however put chained methods on new lines, because they are often a new statement.
And I use 4 spaces for indent, because my IDE is smart enough, it is in my programming language guidelines, and that's what my comapny uses.
Re:Linus on Line Breaks (2020)
by thow_away_soon on Sunday November 28, 2021 @04:20PM
(#29373164)
I'd rather not have that statement more than 80 char long; that might be a one liner where many things are happening, in case there _is_ value is breaking it up, or maybe the variable names are too long, not helping readability.
Long variable names can cause long lines.
So can simple arithmetic that would be worse with intermediate values.
"ancient" doesn't mean wrong. Round wheels are ancient, it doesn't mean we should switch to the square wheels.
>Round wheels are ancient, it doesn't mean we should switch to the square wheels.
No, but it means we better use rubber wheels, not stone ones...
It doesn't mean right either, and the person you are responding to gave specific reasons why they prefer longer.
So it’s almost as if the “ancient” qualifier was useless.
Well it was clearly meant to imply that the reason we are using it is merely tradition, and that there was a reason a long time ago that no longer applies.
It was intended to mean "relavent in old times".
And we all use 80-column wheels because that's what the ancients used, by Zeus!
Oh wait, we use wheels sized for their use cases…
Do we, though?
Re:Linus on Line Breaks (2020)
by hsbauauvhabzb on Sunday November 28, 2021 @05:23PM
(#29373705)
We also shouldn’t burn people deemed witches at the stake. Being ancient doesn’t make it right, either.
When reading code, I'd rather see a single statement on one line, rather that break it at 2 lines because it passed some ancient 80 char limit...