Tom Tobin wrote:
> I'm starting to seriously wonder if the 80-character line width has
> outlived its usefulness.

It has not, and it never will, until human beings stay the same: it's not a
technological limitation.


> There are various naturally occurring bits
> of code that just don't fit onto a single 80-character line, and the
> options for chopping it up are all sub-optimal;

Those options do not decrease readability, once you get accustomed to them:
it's just an initial phase. Remember your first hours staring at Python
code? ;-)

Moreover, if a line is so long, maybe it's doing too many things, and
should be decomposed logically, before recurring to splitting it.

Anyway, parentheses are your friend (even with long strings), but drop the
backslash.


> Docstrings and comments also find
> themselves cramped for space after a few indentation levels.

Docstrings are never indented that much; comments should be concise anyway.


> I find it hard to imagine a programmer these days who is so starved
> for screen real estate that they couldn't handle a width of, say, 120
> characters; I code in Aquamacs Emacs on a 13" Macbook and a 15"
> Macbook Pro, and I come nowhere *near* using all of my screen real
> estate in the horizontal dimension -- and no, I'm not using tiny fonts.
> The same thing applies to any terminal inside of a GUI.

Displaying the source code on a large screen is only one of its many uses:
the keyword here is *interoperability*.


You want to print the code on paper.

You want other non-overlapping windows open at the same time.

You want to make manual three-way merges, with three files shown side by side.

You want to include code snippets in emails, web pages and other documents.

You want to display the code on smaller screens of small devices.

You want readability, which is impaired by larger column widths.


Old good RFC 678 has not been obsoleted in 33 years, and won't be in the
future, near and not so near. It doesn't matter how many DPI (Dots Per
Inch) displays gain, your eyes still need no more than 10 characters per
inch. Your hands still need a Letter, or A4, sheet of paper.

It's not casual that most programming guidelines still follow this convention.


A couple of pages on this matter:

Column Width: What is the One True Way?
http://bluebones.net/2006/12/column-width-what-is-the-one-true-way/

Wrapping code at 80 columns?
http://discuss.fogcreek.com/joelonsoftware4/default.asp?cmd=show&ixPost=128655


-- 
Nicola Larosa - http://www.tekNico.net/

Right now we have two wildly advanced platforms: the desktop operating
system and the Internet. That leaves users with a frustrating choice.
[...] We don't believe people should have to make that choice.
 -- Blake Ross about Parakey, November 2006



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to