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

*To*: Michael Sperber <address@hidden>*Subject*: Re: Vectors as functions*From*: Lieven Marchand <address@hidden>*Date*: 16 Aug 2003 17:41:02 +0200*Cc*: Michael Vanier <address@hidden>, address@hidden, address@hidden*In-reply-to*: <y9l8yptk8cq.fsf@informatik.uni-tuebingen.de>*References*: <20030814170153.80D4B6BEDE@laime.cs.uchicago.edu><AA236D25-CEA2-11D7-B 291-0003938EB888@web.de><16188.3934.267729.188080@cs.brown.edu><32783.141.154.13.159.1060907724.squirrel@stuff.hrnoc.net><200308150336.h7F3aErQ208596@pimout5-ext.prodigy.net><200308150440.h7F4eEW32071@orchestra.cs.caltech.edu><y9lfzk2lwm7.fsf@informatik.uni-tuebingen.de><200308151658.h7FGwCr15280@orchestra.cs.caltech.edu><nm9y8xuiygs.fsf@scrubbing-bubbles.mit.edu><200308151830.h7FIU7p17300@orchestra.cs.caltech.edu><y9l8yptk8cq.fsf@informatik.uni-tuebingen.de>*Sender*: address@hidden*User-agent*: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

Michael Sperber <sperber@informatik.uni-tuebingen.de> writes: > 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))) > foo) > > 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. In CL, this will not do what I'm guessing you think it will do. In CL SET changes the symbol-value of a symbol, which is a global property. Some quotes from the Hyperspec: (set symbol value) == (setf (symbol-value symbol) value) set cannot change the value of a lexical variable. Things like what you hint at can be achieved by judicious use of (locally (declare (special foo)) ...) or other tricks but then you're explicitly (ab)using dynamic binding. -- Jane - Daria? Come on, the neighbors are starting to talk. Daria - Um... good. Soon they'll progress to cave drawings and civilization will be on its way.

**Follow-Ups**:**Re: Vectors as functions***From:*Michael Sperber <sperber@informatik.uni-tuebingen.de>

**References**:**Re:***From:*Robby Findler <robby@cs.uchicago.edu>

**Vectors as functions***From:*Shriram Krishnamurthi <sk@cs.brown.edu>

**Re: Vectors as functions***From:*mike@newhall.net

**Re: Vectors as functions***From:*Robby Findler <robby@cs.uchicago.edu>

**Re: Vectors as functions***From:*Michael Vanier <mvanier@cs.caltech.edu>

**Re: Vectors as functions***From:*Michael Sperber <sperber@informatik.uni-tuebingen.de>

**Re: Vectors as functions***From:*Michael Vanier <mvanier@cs.caltech.edu>

**Re: Vectors as functions***From:*Bruce Lewis <brlewis@alum.mit.edu>

**Re: Vectors as functions***From:*Michael Vanier <mvanier@cs.caltech.edu>

**Re: Vectors as functions***From:*Michael Sperber <sperber@informatik.uni-tuebingen.de>

- Prev by Date:
**Re: Abstracting continuations** - Next by Date:
**Re: Vectors as functions** - Previous by thread:
**Re: Vectors as functions** - Next by thread:
**Re: Vectors as functions** - Index(es):