[707] in Coldmud discussion meeting
assignment clarification
daemon@ATHENA.MIT.EDU (Sun Mar 12 23:04:55 1995
)
From: crag@serial.MIT.EDU (Robert de Forest )
To: coldstuff@MIT.EDU
Date: Sun, 12 Mar 1995 21:58:30 -0600 (CST)
Someone pointed out a possible misunderstanding in the assignment expression
debate. He said some people might think I was proposing a new operator in
addition to '=' to act as an assignment expression so that the following
would be true:
a = b; // Valid
a <- b; // Valid
(a = b) || 1; // Invalid, '=' is not an expression
As it turns out, what I propose is to replace '=' with '<-' or something like
it, as well as to make it an expression.
I think many readers were aware of what I was proposing but best to explain. I
believe I mentioned that I have already made the change. I have a working
server running at sensemedia.net:6666 for those who wish to see what such
a beast would feel like, or who don't believe it's possible or whatever. In
this version the operator is '='.
Having said the above it seems we now have at four questions.
Should there be an assignment statement? (no, an assignment expression
is sufficient since expr; is a statement).
If there is an assignemnt statement what should it be? (=, :=, but I still
still don't want one.)
Should there be an assignment expression? (yes, if you don't want one write
lint--).
What should the assignment expression operator be? ('<-')
Thank you, drive thru.
Crag 'Beavis' de Forest