[680] 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 (Thu Mar 9 14:34:19 1995 )

From: brandon@avon.declab.usu.edu
To: coldstuff@MIT.EDU
Date: Thu, 09 Mar 95 12:26:17 -0700

< Personally, I'd prefer :=..  It's already used in at least one language for
< this purpose

VMS's DCL (Digital Command Language, aka VMS shell) uses ':==' to set symbols
(i.e. make an assignment, of sorts).

< I don't particularly like <- mainly because it doesn't have an = in it (as I
< mentioned above), and because it doesn't much look like an expression either
< (it looks like a statement.. tho I suppose any assignment will conceptually
< seem more like a statement, even if it isn't, but at least '='-based things
< have a history of expressionism(?) to back them up..)

Well, I'm torn here.  I actually like how '<-' looks, it grows on you
aesthetically, but it DOES get to be somewhat confusing with '->'...
(especially if I use '->' to access global methods).

From all of the arguments put forward, I think we could say it is a tossup
between '<-' and ':='.  The pros/cons I can think of are (feel free to add/
change this list):

Assignment operator as '<-':
  * Looks correct (i.e. right is assigned/pointed into left)
  * some think it looks "cool" or is aesthetically pleasing
  * Looks too much like '->' in C, which has a totally different meaning.
  * Looks too much like '->', which may be used to point to global methods
    (versus '.' which would be used to point to local methods)

Assignment operator as ':=':
  * It has been used before in a few languages (including Pascal and DCL)
  * It includes an equals sign, but is a two character sequence per all
    other operators including an equals sign.

< Mind you, I'm not particularly sad to see it go, tho there
< are some others who shall remain nameless which I'd rather see bite it..

Ack, you can tell when you have been programming too long when you start
referring to programming languages as entities/people rather than objects 8)