Subject: Re: let bindings
From: Erik Naggum <erik@naggum.no>
Date: 1999/09/14
Newsgroups: comp.lang.lisp
Message-ID: <3146304078838539@naggum.no>

* Mark Carroll <markc@chiark.greenend.org.uk>
| I get the impression from the CLHS that 
| (let ((x 1)) (let ((x (+ x 1))) x)) will always happily return 2?

  what's your question?

  assuming that it has to do with the scope of the bindings, the scope of
  bindings in a LET can informally be said to be the body form, but none of
  the value forms.  the scope of bindings in a LET* can informally be said
  to include the following value forms and the body.  in an FLET, the scope
  is likewise the body, only, but in LABELS the scope is informally the
  entire LABELS form.  in MACROLET, the scope is the body of the whole
  form, but the bodies of the macros defined are expanded _in_ that body,
  so the scope appears to be the whole form.  whether this is simple or
  complex to deal with seems to depend on the mental model brought to the
  issues at hand.  for instance, I fail to see what could possibly be
  ambiguous about the specification which would lead anyone to have only
  "impressions" as to what it says in this particular case, but it could be
  that the lack of some particular wording or minute point renders a reader
  with a predetermined model unable to get a preconceived question resolved.
  I'd like to understand what the pre-existing model and issue are, since
  it seems to be a lot of small issues like this that keep people from
  seeing the "bloody obvious", and I'm sure it's possible to get rid of a
  lot of confusion with some very simple statement to dispell confusion.

#:Erik