What's with this about "abolish the 80-column rule and write all your text in one line, allowing the machine to auto-wrap"?

I hear it once in a blue moon, and I can understand it for like, mobile phones, but this is a meme, right?

@MutoShack I kind of agree with it myself.. the 80 character rule is prohibitive and often makes for less readable and ugly code.

I either let it autowrap or have a 160 character rule.

@freemo

YOU may not be a lazy man, Freemo, but I am.

Whenever I see a long line of code, I think:
"Perform function N on variable X... Blah blah blah NEXT LINE"

Whereas, when it's broken down into sections, it's not any shorter, but I end up actually reading it.

Also, I think there are *very few* cases in which well-written code actually naturally goes over 80 columns.

One last thing: I have two 16:9 monitors. One vertical and one horizontal. The vertical one pretty much just fits 80 columns (I have a big font) and the horizontal one allows me to have two 80-column frames next to each other.

I know my workflow is more of a "me thing", I just think there are a lot of people who don't have superwide displays.

@MutoShack I generally try to split up my code into whatever is logical and 160 is an upper limit i rarely cross but 80 is impractical in my mind.

Basically the only time it is an issue is if a definition has lots of arguments or inherets from lots of parent classes. In which case each argument gets its own line.

If you cant be bothered to scroll horizontally or use auto-wrap thats your problem lol :)

@freemo

I use autowrap, but of course nothing looks good.

Do you have a public git repository? I want to see this "logical" code of yours! ;-)

Follow

@MutoShack Indeed I do. though many of my projects are refactored and adopted so they dont all represent my coding style.. let me find you one where the formatting is mostly my own...

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.