Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site orca.UUCP
Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxm!sftig!sftri!sfmag!eagle!ulysses!allegra!bellcore!decvax!tektronix!orca!andrew
From: andrew@orca.UUCP
Newsgroups: net.lang.c
Subject: Re: YAAO  (yet another assignment operator)
Message-ID: <1273@orca.UUCP>
Date: Thu, 27-Dec-84 19:23:03 EST
Article-I.D.: orca.1273
Posted: Thu Dec 27 19:23:03 1984
Date-Received: Sat, 29-Dec-84 03:00:15 EST
References: <209@cmu-cs-k.ARPA> <529@vu44.UUCP> <6616@brl-tgr.ARPA> <582@mulga.OZ>
Organization: Tektronix, Wilsonville OR
Lines: 25

[]

	"The idea of = strikes me as a very good and very easy
	to implement idea.  Consider that
		X = Y;		(call this form 1)
	is exactly the same statement as
		X = X  Y;	(call this form 2)

	"Given that  is a legal operator, all C compilers
	already have code to compile form 2.  All we have to do now is
	modify the compiler(s) to convert form 1 to form 2.  This
	should be utterly trivial, and allows us to add a nice bit of
	generality to C."

This isn't really true.  For example, the following two statements have
different meanings:

		X[6*rand()] *= Y;
		X[6*rand()] = X[6*rand()] * Y;

A programmer who codes the first form would not be satisfied if the
compiler were to produce the second form.

  -- Andrew Klossner   (decvax!tektronix!orca!andrew)       [UUCP]
                       (orca!andrew.tektronix@csnet-relay)  [ARPA]