On Sat, Jan 19, 2002 at 12:25:58AM -0800, Paul Makepeace wrote:
> On Fri, Jan 18, 2002 at 11:26:43PM +0000, David Cantrell wrote:
> > if($foo)
> >        do_foo_stuff(); # note that that is a pointless number of
> >                        # spaces, not a tab
> >   else # more arbitrary spacing
> >        do_other_stuff();
> 
> do_stuff($foo);

For suitable values of $foo, do_foo_stuff and do_other_stuff, I'd agree.
I assumed people would take $foo as a placeholder for $some_random_condition
like ... if($garbleflux || $quux || ($quuux < $cluck))

> > instead of my preferred:
> > 
> > if($foo) { do_foo_stuff(); }
> >  else { do_other_stuff(); }
> 
> To me, that looks utterly vile. THat seems unlike any coding style I've
> ever seen or read about.

If you don't like it, you're free to use a prettifier.  I like to make my
if and my else into a single line *if* I'm only doing one thing in them.
Saves vertical space, lets me see more of the code's context around it
when editing.  I'll admit, however, that the single space indent for the
else is somewhat idiosyncratic.

-- 
David Cantrell | [EMAIL PROTECTED] | http://www.cantrell.org.uk/david

Cutting the space budget really restores my faith in humanity.  It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation.
                -- Johnny Hart

Reply via email to