Chuck Esterbrook wrote:
On Sun, Mar 16, 2008 at 10:34 AM, David Brown <[EMAIL PROTECTED]> wrote:
On Sun, Mar 16, 2008 at 09:23:51AM -0700, Paul G. Allen wrote:

 > 8 spaces is too much, it takes too much space on the line. It forces the
 > eye to move and look around the page too much. 2 is too few as it does not
 > separate the indented structure enough from the surrounding structures. 4
 > seems to be optimal as it provides good separation, does not force a lot of
 > eye movement, and does not take up too much space on the line.
 >
 > (Ref.: McConnell, Steve; Code Complete; Microsoft; <http://www.cc2e.com/>)

 But, it's just a bunch of arbitrary numbers.  Why should I care what Steve
 thinks is "too much" or "too little" spacing.  Other people obviously have
 differing opinions.  Change the numbers to different values, and you will
 get a different set of people arguing loudly that they are absolutely
 right.

Ah, but what is the size of those different sets? A LOT of people use
4. I see it more often that 2 which I see more often than 8.

If you restrict your observations to "Linux kernel developers" then,
of course, 8 rules. But across a large range of code on Linux,
Windows, Java, Python, etc. 4 appears to dominate. Why?

The reason is given in the book I cited. There have actually been studies on the subject (and not by the author, but by those he references in the book. Note that any good technical, scientific, etc. book will have some kind of references to back up the conclusions, assertions, etc. that are stated in it.)

PGA
--
Paul G. Allen, BSIT/SE
Owner, Sr. Engineer
Random Logic Consulting Services
www.randomlogic.com

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to