I recently had a discussion with a colleague about whether we should introduce a character count limit per line into our style guide. He believes it e

The Case Against Character Count Line Limit

submited by
Style Pass
2024-10-09 18:30:04

I recently had a discussion with a colleague about whether we should introduce a character count limit per line into our style guide. He believes it enhances readability, while I argue that readability should be facilitated by the editor or IDE, not the content itself. However, I wasn't entirely confident in my stance, as line limits seem to be a common feature in the style guides of many major open-source projects. Surely, there must be a good reason for this that I might have overlooked! So I started researching this niche question.

Turns out I’m not the first one who wondered about this (duh) - but I wasn’t expecting this rabbit hole of heated internet discussions about such an arguably unimportant topic. Quite annoying, that there was no definitive answer - However, there are several reasons why it might make sense in certain cases. Let’s dive in!

It's a mess. And, these are just a couple of examples. I saw repositories using no limits, 70, 72, 79, 80, 88, 90, 95, 100, 120, 125, 130, 132 CPL and then some of these are hard limits; some are soft limits; some only apply to code and others to documentation. So clearly everybody has a different opinion on these!

Leave a Comment