Putting cyrus-future code in CVS. Also, code style

Bron Gondwana brong at fastmail.fm
Tue Jun 29 21:13:49 EDT 2010



On Tue, 29 Jun 2010 12:43 -0500, "Patrick Goetz" <pgoetz at mail.utexas.edu> wrote:
> Bron Gondwana wrote:
> > 
> > How do you feel about:
> > 
> > if (a) function_one(a);
> > else function_two();
> > 
> 
> This is hard to read.  My rule is one liner only if it's really a one
> liner.  Otherwise:
> 
>   if (a)
>   {
>     function_one(a);
>   } else {function_two();}
> 
> is a reasonable compromise between brevity and readability.

Ouch.  You really like that?  I'm scared.  Then again, I prefer the
else on the next line:

/* the usual path */
if (something) {
  stuff();
}
else if (something_else) {
  more_stuff();
}
/* because you can comment between the cases */
else {
  other_stuff();
}

But I'm not tied to a particular style here - whitespace arguments
are reasonable either way.


....

I think we're bikeshedding here.  Let's codify what's there rather than
trying to invent out favourite style.

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Cyrus-devel mailing list