[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vectors as functions

>>>>> "Michael" == Michael Vanier <mvanier@cs.caltech.edu> writes:

Michael> [To Mike Sperber] Does "set" in common lisp destroy lexical scoping?  I'm
Michael> not sure exactly what you were getting at, although I dimly understand that
Michael> there could be a problem.

Lexical binding means you can figure out for each occurrence of a
name, its binding form.  Consider this (probably not exactly
CL-correct, but you'll get my drift, I hope):

(let ((foo 23))
  (let ((name 'foo))
    (let ((foo 42))
      (set name -1)))

At the place 'foo occurs, there's no way to tell what binding it's
associated with.  In fact, it may be associated with several different
bindings at run time, which is a hallmark property of dynamic binding.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla