On 01/30/2011 01:20 PM, Sean Kelly wrote:
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.
It does - bulleted and numbered lists, certain sidebars, block quotes.
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.
Newspaper columns are strongly optimized for being read quickly. Not a
bad standard I guess.
I don't contend that your choice works for you, but I refute this
particular rationalisation of it. Indentation should NOT be discounted
as a participant to the maximum line width. If anything it adds
overhead, not reduces it.
Andrei