Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: The nonexistent operator (along = v. == lines) Message-ID: <26714:Apr419:33:4991@kramden.acf.nyu.edu> Date: 4 Apr 91 19:33:49 GMT References: <156@revcan.UUCP> <1991Apr3.184316.11559@dg-rtp.dg.com> <20206@lanl.gov> Organization: IR Lines: 18 In article <20206@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: > This is one of the problems with confounding two distinct concepts > into one language feature - people soon begin to believe the two > concepts are inseparable. In this case, short-circuiting and > logical con/disjunction are distinct concepts that just happen > to be combined into single operators. What Jim fails to point out is that short-circuiting is almost entirely useless with bitwise operators---it could only make a difference if the first argument had all bits zero, and you can use (a)?(b):0 for that. Conversely, since you can always implement a non-short-circuit logical operator as (e.g.) !!(a) & !!(b), there's no reason for the language to provide any logical operators other than the short-circuit ones. This is common sense, not ``confounding.'' ---Dan