[prog] C and curly braces - question of style?

Finne Boonen hennar at gmail.com
Mon Aug 23 01:04:55 EST 2004


On Sun, 22 Aug 2004 18:52:16 -0400, Katie Bechtold
<katie at katie-and-rob.org> wrote:
> On Sun, Aug 22, 2004 at 06:28:39PM -0400, aec wrote:
> > I have recently begun what is looking like a long
> > and difficult journey into learning C.
> 
> Good luck!  It's a useful language to know.
> 
> > I am told my "style" of using curly braces {} in loops
> > is not generally the best way to do it.
> 
> Your style coincides with the official C coding standard at my
> workplace.  I think the choice of curly-brace placement is entirely
> a matter of personal taste, and your choice is one of several
> accepted coding styles.
> 
> > any thoughts? or should i just worry about more important things :)
> 
> I'd say just worry about more important things.  Yes, you should
> comment your code for easier reading.  Yes, you should indent your
> code and use whitespace liberally.  But, in my experience, there is
> no consensus on the best curly-brace style, and it isn't worth
> worrying (or arguing) about.
> 

if you become attached to a certain style of programming, and suddenly
have to use another one, astyle might be worth looking into.

http://astyle.sourceforge.net/


More information about the Programming mailing list