What about logic and loop constructs?

if {
}
else if {
}
else {
}

while {
}

for() {
}

or do you prefer the opening { on the next line?  I am happy with using

method
{
}

but I think that putting { on the second line for other constructs is very
painful.  I used to treat methods like the above religiously, but reverted
to { on the same line as the method unless space was constrained, and then
put it on the second line.  This was more to conserve vertical space more
than anything.

--jason

On Wed, 13 Dec 2000, Dan OConnor wrote:

> On 11 Dec 00, at 22:10, marc fleury wrote:
>
> > the problem for me is that kawa seems very happy with the "
> > method
> > {
> > }
> >
> > indentation and makes it automated.
> >
> > most tools just follow the SUN coding standard of
> > method {
> > }
> >
> >
> > as with all important problem I propose a toss up :)
> > heads we go A tails we go B...
> >
>
> Hi Marc,
>
> I just flipped a coin, and here are the results: we should go with the
> logical and clear:
>
> method
> {
> }
>
> and not the bizarre and confusing:
>
> method {
> }
>
> approach. I'll leave the coin on the floor where it landed in case
> anyone wants to travel to upstate NY and audit the results.
>
> -Dan
>


Reply via email to