[699] 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 (Fri Mar 10 23:58:11 1995 )

Date: Fri, 10 Mar 1995 20:54:29 -0800
To: coldstuff@MIT.EDU
From: jeffpk@netcom.com (Jeff Kesselman)

>< 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).

LL(2) at least. Ugh. My Pascal/C soul rebels at the notion. :)

>
>< 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..)


I actually kin dof like it, but the VERY forst machine i programmed used <-
(a single key) for assignment.  I actually think it looks GOOD as an
expression as long as we are using the right to left assignment protocol
that C use.  Example:

a<-b<-(c<-0)+5;

Anyway, it works for me.


>>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):

I'm still a HEAVY proponent for =, for the following reasons:
        A) The language is called ColdC.  That implies that where possible and
           reasonable it is C like. C++ doesnt change syntactic things that
           already exist in C, it just adds new ones where it adds new
           concepts.
        B) C is the ONLY other language I am aware of where assignment is an
           expression.
        C) C is the only really standard development language and these days
           is the first one any seriosu programmer is taught.

I am POSITIVE the readers of my book will appreciate C similarities. I KNOW
thats part of what sold my editor on the idea.