Still more new operators (was: == vs =)

Scott E. Schwartz schwartz at gondor.cs.psu.edu
Fri Jan 29 07:39:10 AEST 1988


In article <2411 at haddock.ISC.COM> karl at haddock.ima.isc.com (Karl Heuer) writes:
>In article <9998 at ccicpg.UUCP> nick at ccicpg.UUCP (Nick Crossley) writes:
>Some years ago I invented the hypothetical notation "e1 ,, e2", which would be
>like the comma operator in that it evaluates its left operand before its
>right operand, but (unlike comma) the result would be the value of the left
>operand. 

My off the cuff feeling is that this is a good idea.  I have often wished
for something like this, particularly when trying to write complicated
macro expressions with lots of side effects (and better off written
as functions, to boot! :-) )   (Remember the pascal to c translator posted
to comp.sources.unix last summer?  Anyone notice that the code for terminal
IO was totally wrong?  The reason was that the author used the "," operator
as if it behaved like ",," in several places.)

Naturally I expect the reply to this suggestion is going to be "try C++".


-- Scott Schwartz            schwartz at gondor.cs.psu.edu



More information about the Comp.lang.c mailing list