Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond From: diamond@diamond.csl.sony.junet (Norman Diamond) Newsgroups: comp.std.c Subject: Re: C's triadic operator. Message-ID: <10257@socslgw.csl.sony.JUNET> Date: 16 May 89 05:08:54 GMT References: <26212@watmath.waterloo.edu> Sender: news@csl.sony.JUNET Reply-To: diamond@csl.sony.junet (Norman Diamond) Distribution: comp Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 33 In article <26212@watmath.waterloo.edu> rbutterworth@watmath.waterloo.edu (Ray Butterworth) writes: >With diadic operators they are fairly obvious and reasonable: ... >- If one operand is a pointer to void, and the other is a pointer > to some other type, the void pointer will be coerced to the > same type as the other pointer. >With triadic operators (i.e. c?e1:e2) we have: ... >- If one expression is a pointer to (possibly qualified) void > and the other is any arbitrary type, the arbitrary pointer > is coerced to be an unqualified pointer to void. >Does that seem obvious, reasonable, or useful to anyone out there? Not to me, though this doesn't answer your question. >Since the Rationale has nothing to say about this, >can someone on the Comittee tell us why such strange behaviour >with "?:" is required? Surely you've seen the sign, once posted at Waterloo's computer centre: "Consistency is the last refuge of an uncreative person." ?:-) -- Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.co.jp@relay.cs.net) The above opinions are my own. | Why are programmers criticized for If they're also your opinions, | re-implementing the wheel, when car you're infringing my copyright. | manufacturers are praised for it?