Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site myab.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!mhuxr!ulysses!allegra!mit-eddie!godot!harvard!seismo!mcvax!enea!chalmers!myab!lars From: lars@myab.UUCP (Lars Pensj|) Newsgroups: net.lang.c Subject: Re: YAAO (yet another assignment operator) Message-ID: <150@myab.UUCP> Date: Wed, 26-Dec-84 15:39:53 EST Article-I.D.: myab.150 Posted: Wed Dec 26 15:39:53 1984 Date-Received: Sat, 29-Dec-84 02:51:59 EST References: <209@cmu-cs-k.ARPA> <529@vu44.UUCP> <6616@brl-tgr.ARPA> <582@mulga.OZ> Reply-To: lars@myab.UUCP (Lars Pensj|) Organization: MYAB, Sweden Lines: 39 Summary: x I like the idea of a assignment operator in the form X= Y; (but I am not sure i want it implemented in the language C). Some operators will be redundant, like ',='. I also question the usefulness of '.='. I can see two purposes of this = operator: 1. More dense, compact or readable programs. 2. Make more efficient programs when the compiler isn't smart enough to see this himself. Point 1 can be somewhat satisfied using the preprocessor. In this case, I am more interested in point 2. Why not expand this to the more general case where X = ... X ...; can be rewritten to an expression where the address of X only needs to be calculated once. The syntax for this could be let X = expr in ... X ...; for example let x = a[j*10+i] in x = func(x); This example shows a case where the compiler could not do this optimization if 'j' or 'i' was global variables. Another syntactic form could be X = expr @ ... X ...; This construction already exists in some languages.