On 80 columns should (not) be enough for everyone

Stewart Gordon smjg_1998 at yahoo.com
Sun Jan 30 15:17:00 PST 2011


On 30/01/2011 17:17, Andrej Mitrovic wrote:
<snip>
> 80 colums is an artifact of the old age.  Just like the
> preprocessor is an artifact of the C language.  And many other old
> things are artifacts.  There's no reason to keep these artifacts
> around anymore.

Other than, as you begin to say, the difficulty in deciding on where to 
move the line to.

> A couple of things, Andrei:
> 1.  80 colums is way too restrictive.  80 columns wasn't determined
> by some scientific method to be a good size for code, it's a
> product of limitations of the older generation hardware.  Who will
> run a brand new language like D in a freakin' Terminal?

For all I know, people probably still do run the D compiler in the 
terminal app on Unix-like systems.

> Have you ever heard of the expression "limitations boost
> creativity"?  That can be considered a good thing, if creativity is
> what you're after.  In code, it's not.  You're looking for clarity
> in code.  80 column limitations are good for C obfuscation contests
> and nothing else.  80 columns means people are going to *work
> around* the limit, by using hacks and workarounds to make
> everything fit in place.  Do you really believe that programmers
> are going to spend any time at all thinking: *"oh this line doesn't
> fit on 80 columns.  I should now spend some time thinking about how
> to improve and rewrite the design of my code.  80 columns really is
> the golden ration"*?

For all I know, Fortran programmers probably still do this kind of stuff 
all the time.  I guess the designers of Fortran 90 for some reason 
thought it was right to "protect" programmers by keeping a line length 
limit, though they did at least increase the limit to 132.  Does anyone 
here know how Fortran 95, 2003 and 2008 compare?

<snip>
> 3.  It's 2010.  Does your GNU/emacs still not support wrapping
> lines by word boundaries?  Scite had this since the '90s, and
> that's not even an advanced editor.  Vim supports word wrapping as
> well.

But automatic word wrapping is usually designed to be used on prose, not 
program code.  Do those programs have a word wrapping algorithm that 
makes program code look good?

<snip>
> If you really want to set up a column limit that *everyone* has to
> abide to, then make a poll to see what everyone can agree on.
<snip>

Therein lies the problem - in this day and age, everyone's screen is 
different, and everyone's needs are different.  Even if we can get 
people to agree on a limit of 100 in this day and age, it might not suit 
the programmers of the future.  After all, OUAT people managed with the 
32 columns of the ZX Spectrum.

Stewart.


More information about the Digitalmars-d mailing list