On Tue, 26 Jun 2001, Gross, Stephan wrote:

> Why is this style
>
> if ($x) {
>     do this;
>     do that;
> }
>
> typically preferred over
>
> if ($x)
> {
>    do this;
>    do that;
> }
>
> I like the latter example because it's easier to cut and paste the braces
> and everything in between.  I also think it looks better.  But none of the
> top programmers ever seems to do this.
> Just wondering...

I prefer to use the first version (also known as K&R style or The One True
Brace Style) mainly because putting the { on a line by itself is a
completely wasted line, and I'd rather be able to see the extra line of
code in my editor window instead.

It's a matter of personal preference, really.  Of such things are Holy
Wars made...

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Just because you're paranoid doesn't mean they AREN'T after you.

Reply via email to