3.1.7.1 Talking about let using "=" while assignment uses ":="
Peter Hinely
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. =  ?
Scott Fahlman
It was felt by the majority of the people involved in the decision that creation and initial binding of a variable is a conceptually different beast from reassignment of a variable. The latter is a non-functional, destructive operation and perhaps needs to be used with a bit more care. So it was felt that these operations shold look different.
I can see their point, but I think I would probably have gone the other way on this, using := for both. For me it's close to a toss- up, however, and some of the people who prefer that the two forms look different feel pretty strongly about it.
Antoun Kanawati
>  let x = 1;  // declares a local variable
>              // and binds it to an object
>
>   x := 2;    // binds local variable to
>              // another object
The first form introduces 'x' into the local environment, and associates it with an initial value. The second form changes the association of the symbol x with an object, but does not introduce any new bindings.
Dylan comes from a LISP heritage, where variables REFER to values, not contain values (like in C, or Pascal).
>  My question is, why do the two statements use a
>  different operator?
>  The assignment operator :=   vs.   equality operator =
Actually, you're comparing the "let" binding form to assignment, which is not correct. The "=" operator in "let" is pure syntactic sugar, whereas the ":=" operator is the defining characteristic of an assignment expression.
> 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 two expressions are not assignment. The first is a binding form, whereas the second is a destructive assignment. There are significant differences between the two. The first's effect (introducing x into the lexical scope) is a compile time concept, whereas the second is a runtime mutation.
> 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.
Actually, there is a significant difference in meaning. I'll use the Lispish syntax to demonstrate:
  (let ((x 3)) (+ x 1))
means
  ((lambda (x) (+ x 1)) 3)
That is, it is not assignment, whereas the second form explicitely means assignment.
Nick Kramer
C users probably don't see the distinction.  C++ users, though, shouldn't be entirely unfamiliar with the idea.  C++ draws a distinction between initialization and assignment.  I've been bitten at least once by this:
  class FOO {
  FOO();
  FOO(FOO& original); // Called a copy
                      // constructor
  FOO& operator= (FOO& foo1, FOO& foo2) { .... };
}
void main (void)
 {
  FOO foo1;
  foo1.something();
  FOO foo2 = foo1; // Invokes the copy
                   // constructor,
                   // *not* the = operator!
}
Anyhow, my point is merely that Dylan's distinction between binding and assignment is not entirely unheard of, even by C++ programemrs.