On Wed, Dec 05, 2001 at 07:31:04PM +0100, Andre Poenitz wrote:

> What do the code rules say for
> 
>   if (a) {
>     return b;
>   } else if (d) {
>     return e;
>   } else {
>     // main stuff
>     return c;
>   }
> 
> I'd actually prefer
> 
>   if (a) {
>     return b;
>   }
>   if (d) {
>     return e;
>   }
>   // main stuff
>   return c;
> 
> especially if there are more "cases"  or  (a) and (d) are "enforcing"
> prerequisites for "//stuff"...

but this loses the semantic information that a and d are mutually exclusive.
That's important.

regards
john

-- 
"Faced with the prospect of rereading this book, I would rather have 
 my brains ripped out by a plastic fork."
        - Charles Cooper on "Business at the Speed of Thought" 

Reply via email to