On Wed, Dec 05, 2001 at 07:42:12PM +0100, Andre Poenitz wrote: > > > 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. > > The semantics are the same (if not, it was a typo).
not visibly. You are suggesting that : if (a) { } else if (b) { } becomes if (a) { } if (b) { } I've just lost the information that (a && b) == false. And so has the compiler. > I find this less obvious in (possibly nested) 'else' branches since I > always suspect some hidden "fall through cases". This always makes me > thinking about "obvious" code and forgetting the thing I was going to do... sometimes your thing is the right thing to do, but it is a case by case thing IMHO 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"