I've changed my mind because I've started doing a lot of code-reading on my phone. It's got a big screen (Galaxy S3) but even still, 80 columns is the perfect width to fit all the code on my screen without needing to scroll.
What's old is new again. We went from tiny monitors to huge monitors and now we're back to tiny "monitors" again. Anywhere where I am able to make the determination, 79 columns will be the standard.
I read a lot of code.
http://bugs.python.org/issue18472#msg194089
--- a/pep-0008.txt
+++ b/pep-0008.txt
@@ -159,12 +159,11 @@
Maximum Line Length
-------------------
-Aim to limit all lines to a maximum of 79 characters, but up to 99
-characters is acceptable when it improves readability.
+Limit all lines to a maximum of 79 characters.
EDIT: formatting/description
+Some teams strongly prefer a longer line length. For code maintained
+exclusively or primarily by a team that can reach agreement on this
+issue, it is okay to increase the line nominal line length from 80 to
+100 characters (effectively increasing the maximum length to 99
+characters), provided that comments and docstrings are still wrapped
+at 72 characters.
+
+The Python standard library is conservative and requires limiting
+lines to 79 characters (and docstrings/comments to 72).
+
https://codereview.appspot.com/12269044/patch/1/1001https://gist.github.com/radiosilence/6133713
I mean how can anyone say that the former is better than the latter?
If you have a line that would suffer under 79 chars, let it go a little long, but no farther than 99.
In vim, I'm thinking about using:
set colorcolumn=79
set textwidth=99 When applying the rule would make the code less readable, even for someone who is used to reading code that follows the rules.Yeah, I could have 300 char wide terms, or 600 if I really wanted to. There was a reason for 79. There isn't for 99.
Edit: Glad to see that section might get an update http://bugs.python.org/issue18472#msg194086
Edit2: Gudio van Rossum proposes a patch https://codereview.appspot.com/12269044/diff/1/pep-0008.txt
There's a reason newspaper stories are in columns.
> Aim to limit all lines to a maximum of 79 characters, but up to 99 characters is acceptable when it improves readability.
edit: you're correct, that's the rationale in the pep. It's not why I stick at 79 though, I do it for git log -p, etc.
OTOH, 0x0d definitely counts toward the limit!
In other words, it's a line ending, not a line separator.
While we're at it, can we ditch the convention of indenting arguments to line up with the method name? A single tab per-nested level will do.
I think I'm fine with it provided that readability doesn't suffer if my editor or viewer wraps line >79 characters. I don't want to be forced to make everything wider to see that extra readability. But if making it wider makes it more readable even if my editor wraps the line, then that makes sense.