Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!delmarva.com!newsfeed.internetmci.com!news.msfc.nasa.gov!pendragon.jsc.nasa.gov!ames!news.hawaii.edu!uhunix4.its.Hawaii.Edu!phinely
From: phinely@uhunix4.its.Hawaii.Edu (Peter Hinely)
Subject: Oddities of Dylan's syntax
X-Nntp-Posting-Host: uhunix4.its.hawaii.edu
Message-ID: <DEABCB.ILr@news.hawaii.edu>
Sender: news@news.hawaii.edu
Organization: University of Hawaii
Date: Sat, 2 Sep 1995 15:36:11 GMT
Lines: 33

Hi,

Some aspects of Dylan's syntax bother me (maybe because I don't know what 
I am doing. :)

     let x = 1;                  // declares a local variable and binds 
								it to an object

     x := 2;                     // binds local variable to another object


My question is, why do the two statements use a different operator?  

 The assignment operator :=     vs.    equality operator = 

Why didn't the designers of Dylan use the syntax:

     let x := 1;

It would seem to be more consistent syntax if they used the same 
operator.  Both statements are assignments, even though the first 
statement initializes x.  The only other difference that I can think of 
is that the scope of x begins right after the end of the "let" 
declaration statement that declares x.

     let x = x + 1;                 // ERROR
     x := x + 1;                    // VALID

Anyone want to comment on := vs. =  ?

Aloha,
Peter

