On 80 columns should (not) be enough for everyone

Sean Kelly sean at invisibleduck.org
Sun Jan 30 11:20:43 PST 2011


Walter Bright Wrote:

> Andrej Mitrovic wrote:
> > 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.
> 
> 80 columns came from how many characters would fit on a standard size 8.5*11 
> sheet of paper. Even punch cards followed this precedent.
> 
> That paper size has stood the test of time as being a comfortable size for 
> reading. Reading longer lines is fatiguing, as when one's eyes "carriage return" 
> they tend to go awry.
> 
> You can see this yourself if you resize and reflow a text web site to be 
> significantly wider than 80 columns. It gets harder to read.

Print text doesn't have indentation levels though.  Assuming a 4 character indent, the smallest indentation level for code in a D member function is 8 characters.  Add a nested conditional and code is starting 16 characters in, which when wrapped at 80 characters begins to look like a newspaper column.  I wrap all my comments at 79 characters, but allow code to spill as far as 110 (which is the number of columns on an 8.5x11" piece of paper in landscape mode).


More information about the Digitalmars-d mailing list