Subject: Re: Idiot's guide to special variables take 2
From: Erik Naggum <erik@naggum.no>
Date: 19 Nov 2002 08:34:10 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3246683650270899@naggum.no>

* Kurt B. Kaiser
| The task of evaluating the arguments is passed to `eval´, and it proceeds
| to produce a different result than the "normal" evaluation referred to in
| the HyperSpec.

  But it does not.  That is the whole essence of this thing.

| That's the view from someone of limited CL experience.  However, I think
| I'm getting it now.

  I think what some people here fail to grasp is that `eval´ is the most
  ordinary function you can think of.  Suppose you replace `eval´ with
  `identity´, which returns the argument.

(let ((x 42))
  (identity x))
=> 42

(let ((x 42))
  (identity 'x))
=> x

  Now we know what `eval´ /receives/.  The question is, what should it do
  with it?  By the very nature of lexical bindings, they are only visible
  in their /lexical/ scope, hence their name.  This means that when the
  function, `identity´ /or/ `eval´, receives the argument, `x´, we are no
  longer in the /lexical/ scope of the binding for `x´, hence we cannot
  refer to this binding at all.

| > | On a slightly different, but closely related, subject, I find it
| > | confusing that the `special declaration also "punches holes" in those
| > | parts of the lexical overlay which were created after the last
| > | dynamic binding, as in the example.
| > 
| >   I have no idea what this means. 
| 
| The terminology "punches holes" is from your intuitive example.

  It is precisely /because/ of that that it makes no sense.  I know what I
  meant with the analogy.  What I am left with now is that it was not fully
  understood or was interpreted beyond the intended effect.

| I should say, "...including those marks on the lexical overlay which were
| created after the last dynamic binding..."

   A `special´ declaration with lexical scope is different from a `special´
   proclamation, which is a declaration with global scope.

| I think my biggest problem is getting away from concepts picked up from
| the old dynamic Lisps.

  If Emacs Lisp was your first encounter with `eval´, as another poster
  suggested, realizing the effect of lexical binding could take time.

| I don't think I'm having too much trouble letting go.  CL is CL.  I only
| explained in detail how I was stuck because you asked.

  Hm.  I try to keep in mind some form of predictive intuition about what
  people I try to explain something to must have understood and where their
  points if confusion remains, but I must admit to have lost track of you.

-- 
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.