[668] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: assignment operator

daemon@ATHENA.MIT.EDU (Tue Mar 7 16:33:06 1995 )

From: bellegj@monitor.cs.orst.edu
To: coldstuff@MIT.EDU
In-Reply-To: Your message of "Tue, 07 Mar 95 14:46:48 PST."
             <m0rm69a-000KcEC@serial> 
Date: Tue, 07 Mar 95 13:24:59 PST

> I'd like to propose '->' be the assignment operator. It visually represents
>  what happens to the variable being assigned the new value. It has no chance
>  of being pronounced, 'equals'. It looks cool...
> 
> @program $root.init_root
>  if (caller() != $root)
>    throw(~perm, "Caller is not $root.");
>  child_index -> 0;
>  owners -> setadd([this()], sender());
>  fertile -> 0;

My biggest problem with this is that the -> implies implies flow from 
information from left to right.  If I was to read
 foo -> bar;
My first reaction would say that bar takes the value of foo instead of foo 
takes the value of bar.  

My own take on the assignment-as-expression issue is that while it would be 
nice I don't think it's woth complicating the language to get.