I did a poll on this 2 years ago:
and 92 was the most common choice.
I don’t think this value comes from any deep principles, it is just kind of a sweet spot for most people in the sense that longer lines usually signal a problem with the code.
In particular:
- indentation with 16–20+ spaces: consider moving code to local or global functions
- very long argument lists: group them to (immutable)
struct
s or similar - closures taking up a lot of the line length: use
do
, or a local named function - if all else fails: just break that line somewhere