Please, let us not start the great brace and indentation holy war here. 

I'm a firm believer that Whitesmiths is the best style to use. Allman a
close second. K&R is awful. 

None of that matters. 

On a shared project, a standard is better than being right. 

Also, if you want to reformat code, take a look at astyle, (sorry don't have
a URL handy) a syntax directed indent engine that converts between the
various styles.


-----Original Message-----
From: Alex Fernández [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 8:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [PROPOSAL] The Commons


Hi all!

"Geir Magnusson Jr." wrote:
> I support the notion of standardization, but some of the Sun conventions
> are just awful, particularly the bit about ending the method declaration
> with a '{'

Right, code becomes "asymmetrical", and hard to read.

> Futher, I like starting blocks with a { a la
> 
>   if( foo )
>   {
>     <block>
>   }

That looks a lot nicer. Even if the resulting code has more lines, it
can be scanned 17465% faster (though YMMV).

> I know it makes code 'big', but I personally find it easy to read, and
> then if someone adds something, you don't get stuck with the bug
> 
>   if(foo)
>     bar;
> 
> going to
> 
>   if(foo)
>     woogie;
>     bar;
> 
> if they forget to add the braces, which can be a bear to find,
> especially when groggy and tired :)

Sure, and what about

    if (foo);
      bar;

Compare with

    if (foo);
    {
      bar;
    }

which is much easier to spot.

Un saludo,

Alex.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<><><><><><><><><><><><><><><><><><><><><>This electronic mail transmission
may contain confidential information and is intended only for the person(s)
named.  Any use, copying or disclosure by any other person is strictly
prohibited.  If you have received this transmission in error, please notify
the sender via e-mail. <><><><><><><><><><><><><><><><><><><><><>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to