[Python-ideas] 80 character line width vs. something wider
Raymond Hettinger
python at rcn.com
Wed May 20 19:44:15 CEST 2009
>> As pointed out elsewhere in this thread, very often the superior
>> solution is not to re-*format* the same statement to fit, but to
>> re-*factor* the code so it's less deeply indented or does less in each
>> statement.
>
> Yes, "refactor" is a much better word than "reformat" for what I was thinking.
So, it seems that support for an 80 character limit is rooted in a desire
to have other people program differently than they do, somehow making
their programs better just because they are adhering to an arbitrary limit
on horizontal text width. That seems somewhat magical. Maybe the limit
should be 40 chars, then everyone will have to refactor, and line wrap, and
use smaller idents (like Google does), and use more abbreviated variable names.
Maybe the origin of the 80 char limit isn't an anachronism. Maybe it had
nothing to do with teletypes and low resolution CRTs. Perhaps, the
programming gods of old were reaching into the future with certain
knowledge that they were forcing everyone to do the right thing.
Who knew?
Raymond
More information about the Python-ideas
mailing list