[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.