99 vs 100 column limit

Continuing the discussion from Column limits and rightward drift:

Nobody uses 100-column terminals anyway, and if we want to support that, shouldn't we also remove a few columns to allow space for a line number, for example?

I don’t like to rule either. I actually went through the whole thing back when I was using vim as my main editor and I think I ended up with using 76 as the limit. It’s a mess and it doesn’t scale at all. I’ve used 80 ever since (not 79…) and it just works.

Typographers seem to agree that the perfect column width lays somewhere between 45 and 75 characters. (See: https://en.wikipedia.org/wiki/Column_(typography)#Typographic_style)

(BTW: I’m using 2-space indents rather than 4 as well…)

Not quite nobody! 100x37 is the native console size on an old ThinkPad I use as a terminal because of its hardware text mode.

1 Like

I use a 120 characters limit in my own projects. Fits on a 1024xWhatever resolution, can fit two of them on a 1920xWhatever resolution. I don’t like to restrict myself because of old technology.


I don’t like to restrict myself because of old technology, too.

100, 110, or 120 column limit will be all OK to me.

As I said in the other topic

The only reason for 99 instead of 100 was by taking the justification for 79 vs 80 and applying it to 100. But 80 has a lot of historical baggage, and 100 doesn't, so there's no need to cater to people who have terminals that are precisely 100 columns wide.

It’s at this point that you need a benevolent dictator, because any choice is arbitrary, and someone just needs to say “This is what we’re doing”

[quote=“jimuazu, post:7, topic:47”]any choice is arbitrary [/quote] Not at all. “Arbitrary” means based on random choice or personal whim, rather than any reason or system.

  • 79 or 80 is justified by tradition and compatibility with old technology.
  • 100 is based on a survey on support on popular websites for sharing code (Github, Gist, SO, Reddit, etc.)

I suppose one could also use a large code base, say rustc, and quantify the number of line wraps needed for different column limits if the code was auto formatted. Perhaps this number of line wraps isn’t linear to the column limit. Perhaps Rust code has a natural line length determined by the median numbers of indentations/blocks as well as the typical length of identifiers and the complexity of expressions. Perhaps there’s a sweet spot (or range) that could be empirically determined.

Various surveys and measurements and so on can give guidance to a decision, but really the final choice of a single number is an arbitrary choice someone has to make – unless that is the majority of the surveys amazingly come out with exactly the same number. We can argue all day whether +/- 1 from the chosen number would have been better, but it seems rather pointless. All that is necessary is that a decision be made, and then the next problem can be tackled. I’m sure if it turns out that the chosen number was off by 10 then the question will be revisited later.

I’d like to focus on whats actually most comfortable for people to read rather than tools to display.

I’d also recommend you to look at the style guides people use today.

80 chars, 2-space indent:

80 chars:

Keep in mind that prose is denser than code and displayed in a proportional typeface.

There’s very little reason to believe the ideal line length for prose has any correlation at all to the ideal line length for code.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.