Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!tank!uxc!uxc.cso.uiuc.edu!a.cs.uiuc.edu!s.cs.uiuc.edu!carroll
From: carroll@s.cs.uiuc.edu
Newsgroups: comp.lang.misc
Subject: Re: Many people's opinions on compu
Message-ID: <208100001@s.cs.uiuc.edu>
Date: 20 Sep 88 05:20:00 GMT
References: <1433@garth.UUCP>
Lines: 14
Nf-ID: #R:garth.UUCP:1433:s.cs.uiuc.edu:208100001:000:653
Nf-From: s.cs.uiuc.edu!carroll    Sep 20 00:20:00 1988



/* Written  8:50 pm  Sep 18, 1988 by smryan@garth.UUCP in s.cs.uiuc.edu:comp.lang.misc */

In short, if you want p and q, use p&&q. If you want, if p then q else don't
bother with q, just say false, use p?q:false.
/* End of text from s.cs.uiuc.edu:comp.lang.misc */

But if the compiler has any brains at all, p && q should be compiled to
the same thing as p?q:false. I don't see what the latter gains you
except to irritate the programmer.

Alan M. Carroll		                      carroll@s.cs.uiuc.edu
Grad Student / U of Ill - Urbana ...{pur-ee,convex}!uiucdcs!s!carroll
"Too many fools who don't think twice, too many ways to pay the price" - AP&EW