Subject: Re: Idiot's guide to special variables take 2
From: Erik Naggum <erik@naggum.no>
Date: 18 Nov 2002 00:59:33 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3246569973032676@naggum.no>

* Aleksandr Skobelev
| What the equivalence do they speak about?

  Sigh.  It means that when somebody says the "null lexical environment",
  the expressin contains relevant information about (at least) two things:
  (1) the perspective and (2) the object.  The same holds for "the global
  environment", of course, in which case the object is the same as for the
  previous expression, but the /perspective/ is not.

| Do they mean that, like the global environment, the null lexical
| environment contains no lexical bindings?

  The global environment is what you get when you have no lexical bindings.

  The point here is that the lexical environment shadows the global.  When
  you have an empty/null lexical environment, you have nothing that could
  shadow the global environment, therefore the consequence of viewing your
  environment through the now empty/transparent lexical environment is that
  you see only the background global environment.  But it is possible to
  look at the global environment /without/ looking through a transparent
  lexical environment that shadows nothing, hence the two perspectives have
  different names.

  Think of bindings as squares on a blackboard.  You can flip overlays over
  the blackboard from both sides, and the overlays can have opaque squares
  that shadow any other bindings but otherwise be transparent.  Now, the
  overlays attached to one side holds overlays for special bindings while
  the other side holds lexical overlays, so you can flip them in from both
  sides.  A `special´ proclamation means that you cut a whole in all the
  lexical overlays so that you will always see the dynamic bindings.  When
  you make a special binding, you make an opaque square on an overlay you
  have flipped in from the special side and scribble on it.  When you make a
  lexical binding, you make an opaque square on an overlay you have flipped
  in from the lexical side and scribble on it.  When you call a function,
  you temporarily remove all your lexical overlays, but the special overlays
  remain, and you use a fresh set of lexical overlays.  Now, if you make no
  lexical bindings on this fresh set of overlays, you have the null lexical
  environment.  This is what `eval´ starts out with, just like any other
  function before it makes its own lexical bindings, such as for incoming
  arguments (which may also cause special bindings, btw).

  Did that make the issue opaque or transparent?

  And, please, there is no global lexical environment.  While some evidently
  think it is descriptive of something, it is an oxymoron that only confuses
  people who do not understand what is going on.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.