Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2001 21:16:34 +1000
From:      Stephen McKay <mckay@thehub.com.au>
To:        "Matthew D. Fuller" <fullermd@futuresouth.com>
Cc:        j mckitrick <jcm@FreeBSD-uk.eu.org>, chat@FreeBSD.ORG, mckay@thehub.com.au
Subject:   Re: silly C style question 
Message-ID:  <200101241116.f0OBGYm22317@dungeon.home>
In-Reply-To: <20010123180351.C26758@futuresouth.com> from "Matthew D. Fuller" at "Tue, 23 Jan 2001 18:03:51 -0600"
References:  <20010122170600.D4456@dogma.freebsd-uk.eu.org> <200101231023.f0NANZI18506@dungeon.home> <20010123180351.C26758@futuresouth.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 23rd January 2001, "Matthew D. Fuller" wrote:

>On Tue, Jan 23, 2001 at 08:23:35PM +1000, a little birdie told me
>that Stephen McKay remarked
>> 
>> Use neither of these!  Use:
>> 
>> if (i == 0)
>>     {
>>     foo(i);
>>     bar(i);
>>     }

>But indenting the braces?!  That's a stoning offense.  I can't read it to
>save my life.

Go on!  Give it a go!  It grows on you.  And it's logical too.  Just
think of the language components like a parser would and group logical
units together.

>And lemme tell ya, when you get 70 or 80,000 lines of code
>with that style, and re-indent it all, it makes one hell of a cvs diff.

I know I'm not popular when "indent" can't generate my style.  It can't
even come close.  Maybe I should fix the bugs in "indent"...

Anyway reindenting is a bad idea if the original code has any identifiable
style.  Go ahead and reindent the stuff that is erratically arranged (I've
seen plenty of it), but leave the rest alone.

Stephen.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101241116.f0OBGYm22317>