Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!psuvax1!gondor.cs.psu.edu!schwartz From: schwartz@gondor.cs.psu.edu (Scott E. Schwartz) Newsgroups: comp.lang.c Subject: Re: Still more new operators (was: == vs =) Message-ID: <3255@psuvax1.psu.edu> Date: 28 Jan 88 21:39:10 GMT References: <626@PT.CS.CMU.EDU> <214@oink.UUCP> <2681@mmintl.UUCP> <9998@ccicpg.UUCP> <2411@haddock.ISC.COM> Sender: netnews@psuvax1.psu.edu Reply-To: schwartz@gondor.cs.psu.edu (Scott E. Schwartz) Organization: Penn State University Lines: 19 In article <2411@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: >In article <9998@ccicpg.UUCP> nick@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@gondor.cs.psu.edu