Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2001 13:16:49 -0600
From:      "G. Adam Stanislav" <adam@whizkidtech.net>
To:        j mckitrick <jcm@FreeBSD-uk.eu.org>, freebsd-chat@FreeBSD.ORG
Subject:   Re: silly C style question
Message-ID:  <3.0.6.32.20010122131649.009c9730@mail85.pair.com>
In-Reply-To: <20010122170600.D4456@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 17:06 22-01-2001 +0000, j mckitrick wrote:
>When using opening and closing braces for a loop or other control structure,
>most coders put the opening brace on the same line as the decision
>statement.  It seems to me, using it in more of a block format would make
>the code easier to read.  Does this make sense?

I am not sure that it makes it easier to read (since the indentation
clearly shows where the block starts and ends), but if it makes sense
to you, by all means, use it.

Personally, I prefer the K&R style because it keeps all the logic on
one line and, as someone else pointed out, it saves one line of display
space.

But the whole point of C style is that you develop your own. Not every
painter is a cubist, some are dadaists (and most are neither). That does
not make them better--or worse--just different.

Cheers,
Adam

--- 
Whiz Kid Technomagic - brand name computers for less.
See http://www.whizkidtech.net/pcwarehouse/ for details.


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?3.0.6.32.20010122131649.009c9730>