On Wed, Jan 02, 2008 at 02:40:25PM -0800, SJS wrote:

And I've been finding a stronger correlation between preferred brace
styles and acceptance of indentation-as-whitespace.

Folks who don't mind:

 if (expression)
    {
    code
    }
or

 if (expression)
    {
       code
    }

Mostly seem to have no (or little) objection to indentation-as-syntax.

Folks who prefer

 if (expression) {
    code
 }

or

 if (expression)
 {
    code
 }

Mostly seem to object to indentation-as-syntax.

I am evidence of anti-correlation, then.  The later two are "obviously"
correct.  However, I also think that indentation as syntax is a valuable
and useful thing.  I happen to like programming in python, and indentation
is one of the reasons.

Your examples may just be a matter of where someone's inspiration came
from.  Unlike the ugly examples (which I've deleted), there is at least
some argument as to why they should be done that way.  The second one (at
least with 2 spaces for each step) is pushed by Richard Stallman.  The
third is K&R, and the last tries to be more consistent with the K&R
function definition syntax.

Dave

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

Reply via email to