Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!dsill@NSWC-OAS.arpa From: dsill@NSWC-OAS.arpa (Dave Sill) Newsgroups: comp.lang.c Subject: The D Programming Language (was: Still more new operators) Message-ID: <11702@brl-adm.ARPA> Date: 7 Feb 88 19:29:25 GMT Sender: news@brl-adm.ARPA Lines: 24 >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. Look what this buys us: > a,, a=b /* displacement operator, like a :=:= b */ > a=(b,, b=a) /* a simple swap */ > x,, ++x /* same as x++; but generalizable */ > free(stack,, stack=stack->next) /* pop stack */ > stack->value,, pop(stack) /* pop and return stacked value */ I like it. Nice and general, fills a gap missing in C. It's not C, but it could be D (it *should* be D, not P (pee?)). Maybe we should start a new newsgroup/mailing-list for the discussion of such things. It seems like a lot of the current discussion here is about things that will never make it into ANSI C such as a power operator, `noalias' :-) et cetera. Sure would improve the S/N ratio for those interested only in C. ========= The opinions expressed above are mine. "The limits of my language mean the limits of my world." -- Ludwig Wittgenstein