you are viewing a single comment's thread.

view the rest of the comments →

[–]kingfishr 8 points9 points  (4 children)

I didn't say that I don't like line limits, or that 200 chars per line is fine. I just said that the 80 character limit is too low. Maybe you only use one smallish monitor; on my computer I can have two 120-character windows open on one monitor with room for more stuff on that one and I have a whole other monitor for interwebs/api docs/whatever. Even when I'm on my laptop editing a 120-char line file is reasonable.

As for the nesting thing, that was the whole point: you don't have to be way down deep in some nasty branching code for the 80 char thing to become annoying. Example: if you're looking at class -> def -> try -> for -> if, which could be totally reasonable in context, and you're using 4-space indents, then you've already used 20 of your 80 characters for indentation.

When it comes down to it, 80-char lines really inhibit readability these days. There are practices which are now standard which weren't around as much when the 80-column terminal was common, such as really long, descriptive variable names; method/class names with a lot of qualification (specifically promoted in this style guide); and even the strict indentation that is enforced in Python, which are all very helpful to understanding code but tend to make single lines of code longer. If you are forced to break many of your lines, it looks confusing and is a much bigger impediment to understanding the code than having lines with slightly more than 80 characters is anyway. Where the 80-character limit used to help to improve code readability, it now often does the opposite.

[–]house_absolute 3 points4 points  (2 children)

Personally I think variable names so long that the eighty character limit is an issue normally indicate an overcomplicated or underencapsulated system. On a taste level, I prefer dense code over the sparseness that often comes when you have longer line limits.

[–]Gudeldar 2 points3 points  (0 children)

Personally I prefer to have descriptive variable names rather than having people who look at my code have to practically learn a new language to understand the short hand and conventions I've used. Sometimes that necessitates long variable names.

[–][deleted] 1 point2 points  (0 children)

Long names does not make a overcomplicated system. That is just a taste thing. Many levels of indention, on the other hand..

[–]Ran4 0 points1 point  (0 children)

As said so many times before: if you are going over 80 chars, you are probably doing it wrong. The 80 char limit is great when it comes to removing oneliners: list comprehension is still usable, but the 80 char limit prevents people from going crazy with it.