[EMAIL PROTECTED] wrote:
On Fri, Mar 14, 2008 at 04:22:20PM -0700, Andrew Lentvorski wrote:
Excuse me, but there is not a single shred of validated evidence about
this *either way*.
However, if you really want to read a related blog post. Steve Yegge
has some interesting comments:
http://steve-yegge.blogspot.com/2008_02_01_archive.html
I read that blog. Interesting read. The only evidence I can offer
for my 8/80 proposition is anecdodal. It feels right
*to me*. I suppose you can question rather that is just my ignorance
or closed mindedness to alternatives. Dunno. But I'm happy now.
The problem with 8 space indents is that it litters your code with
"return;" staements.
So, you have lots of "goto exit;" statements simply to break out of the
indentation system rather than setting a flag and cleanly exiting the
indentation set.
This can be good or bad. However, 8 space indents tends to *force* one
way even when the other would be better.
I found this out when rewriting the rpc.lockd for FreeBSD. It is much
better to actually set flags and exit at a single point because it makes
adding new states later a much easier task. However, this means that
you tend to have 4 or 5 levels of indent sometimes.
This, of course, is effectively incompatible with 8-space indents.
So, the FreeBSD folks rewrote my indented code with lots of "return;"
breakouts. It took them 3 months to get the states correct, and, when
they had to add an extra state, all those "return;" statements had to be
redone.
Eventually, I realized that it would be easier just to maintain the
original way I wrote it for bug fixes and just redo the
"return;"-ification rather than trying to fix the "return;"-ified version.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg