Code is READ far more often than it is written! Lines more than 80-ish characters impose a rapidly increasing cognitive and visual burden with every additional character. Really, starting at more like 70 characters. It's not quite exponential in the harm, but it's strongly super-linear, after the threshold.
I use a 32" high res screen and run my terminal in full screen mode. Even with eyes not quite so sharp as when I was younger, I can easily read about 300 characters wide in a very legible font.[*] I ALMOST NEVER write lines that exceed 80 characters. If I am project lead or technical manager I will first warn anyone who does, then fire them as harmful to the project if they don't fix their habits. [*] Although my terminal is that big, I use tmux to have several panes of useful width. The widest, central, one is something like 112 chars, but I really don't want the rightmost part to show code EVER. On Sun, Feb 7, 2021, 8:20 PM Brendan Barnwell <brenb...@brenbarn.net> wrote: > On 2021-02-07 09:59, Christopher Barker wrote: > > All that being said, it's not that big a deal, and I personally don't > > try to limit to 80 chars per line anyway -- preferring 90 or 95 -- I > > haven't used a VT100 in decades .... > > To be honest I find it kind of ridiculous that people are still > worrying about line lengths in this day and age. It's especially > strange that people will talk about how a proposed feature interacts > with relatively sophisticated editor/IDE features like syntax > highlighting and autocompletion, yet still have no problem working with > editors that are woefully limited on a much more basic feature. It's > called line wrapping. > > We as humans should not be concerned with how long LOGICAL lines > are > until and unless it actually impinges on our ability to comprehend them. > The appearance of the VISUAL line should not enter into our > decision-making because that's a matter for the editor displaying the > code. There's no reason not have lines that are 200 or 300 or even 1000 > characters long if you want to (for instance for a long string literal); > it's the editor's job to take a semantically-motivated set of lines and > indentations and display them attractively. Then if different people > have different preferences they can set their editors to different line > widths and see the code in their preferred format. Editors that don't > support such features need to be fixed and we shouldn't continue to > enable them by insisting that people distort the semantic structure of > their code to fit arbitrary guidelines like 80 or 95 characters. A > person should insert a line break whenever they think it's a good idea > for semantic reasons (e.g., separating statements) and not insert any > when they don't think so, and leave the rest up to the editor. > > -- > Brendan Barnwell > "Do not follow where the path may lead. Go, instead, where there is no > path, and leave a trail." > --author unknown > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/UBDGX2TXQPWOMERIHF7U2Y7FK2H5346O/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/L6S7SXTP4H6GQPBKXV2X7BZ3LOEC2FFZ/ Code of Conduct: http://python.org/psf/codeofconduct/