3 ms·
Based on experience and experimentation, I advocate 110 characters as a hard limit (i.e., would reject a change based on line length alone) and 90-95 as a good
by evilotto 5y ago
Based on experience and experimentation, I advocate 110 characters as a hard limit (i.e., would reject a change based on line length alone) and 90-95 as a good guideline.
The rationale for the 110 is that above that you cannot avoid wrapping in a side-by-side diff on a reasonable screen+font+layout. 90 is where you should be asking yourself "is this cleaner to split across multiple lines?" and still allowing some headroom to make minor changes without needing to reformat things.
There are of course some things where it is impossible to constrain things to shorter lines (e.g., markdown tables) but those are definitely the exception.
- layer8 5y agoAgreed, personally I find 120 already too much.