[671] 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 (Wed Mar 8 04:12:29 1995 )

Date: Wed, 8 Mar 95 11:09:52 IST
To: coldstuff@MIT.EDU
From: bmgustav@bioinformatics.weizmann.ac.il (Gustavo Glusman)

I wrote:
>> := is what is used in Pascal, and it is mistaken by = no less. People fail
>> to type the : too easily.
>> In other words, it might not solve the issue.
>> I think <- is very good, and that its being 'far from normalness' can be an
>> asset, since the 'normal' methods cause confusion.

Jeff Kesselman answered:
>Well, I'm going to be the dissenting voice here.  +=, -=, etc. all seemed
>very rational to me.  The = being an assignment operator ONLY caused me
>some trouble when i forst moved from Pascal to C, and it was minor
>trouble at that.  You learn very quickly to be careful abotu this.  The
>(IMO sad) fact of the matter is that fewer and fewer students are even
>taught Pascal before C, so I REALLY think diverging away from C syntax
>just because of some misguided notion that "we can do it better" is a BAD
>idea.  Currently, the places ColdC differs from C for the most part make
>logical functional sense. (Such as in the for construct, which is a true
>set operator rather then a simple ordinal iterator.)
>The fact of the matter IMO is that divergence
>away from C, even in an attempt to "make it clearer" will onyl make it
>harder for people to learn the language.
>My 2 cents.

OK, let me clarify my statement/opinion:
I think that just '=' as assignment operator is ok. That the programmer
should learn to pay attention to the difference with '=='.
What I was saying is that, if the notion is to drop '=' because it may
cause confusion, then ':=' isn't any better. At that, '<-' may be stronger.

Gustavo Glusman               Founder/administrator of BioMOO
-- Gustavo@bioinformatics.weizmann.ac.il
-- http://bioinformatics.weizmann.ac.il:70/0h/Gustavo/Glusman
-- BioMOO: telnet bioinformatics.weizmann.ac.il 8888
           WWW:   http://bioinfo.weizmann.ac.il:8888