On 23.01.23 22:12, Matthias Andree wrote:
While the idea is sound, 80 character wide lines seem so... 1980's. Do
people still need to read and edit darktable source code on 640x480
displays?
This has nothing to do with how many character fit on a line on any
display and everything with legibility.
Just because it's code doesn't mean rules discovered by typographers and
used for typesetting text for centuries do not apply. ;)
45-90 chars/line is the suggested default for body text.
See https://practicaltypography.com/line-length.html
There are modern languages which enforce a unified code formatting
style. Rust e.g. hast rustfmt which almost all projects run
automatically, via githooks or the like. So Rust code is always
formatted the same way which is extremely helpful when reading other
people's code (which is, after all, what most software developers do
most of the time, even if we hate it and hate to admit it even more).
The relevant defaults in rustfmt are:
comment_width = 80 (comments, i.e. text)
max_width = 100 (code)
That said, in three years of using Rust and seeing Rust code in the
wild, I've never seen 100c/l ever reached because there are other rules
in rustfmt that commonly prevent this.
.mm
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org