Article View: comp.std.c
Article #6041Re: C's triadic operator.
From: Norman Diamond
Date: Tue, 16 May 1989 05:08
Date: Tue, 16 May 1989 05:08
33 lines
1859 bytes
1859 bytes
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?
Technical Details
Message-ID:
<10257@socslgw.csl.sony.JUNET>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamondReferences:
<26212@watmath.waterloo.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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