[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `pp-eval-expression' behaves strangely under lexical binding
From: |
Marcin Borkowski |
Subject: |
Re: `pp-eval-expression' behaves strangely under lexical binding |
Date: |
Sun, 17 Apr 2016 19:42:18 +0200 |
User-agent: |
mu4e 0.9.13; emacs 25.1.50.8 |
On 2016-04-17, at 16:15, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> But isn't my question still valid for `symbol-value'?
>
> No, whether it's implemented in C or in Lisp is irrelevant. As soon as
> you put a symbol into a `quote`, it can't be a reference to a lexical
> variable any more because the compiler will treat it as data and data
> cannot refer to lexical variables, only to other data.
>
> Dynamically scoped variables are data, on the other hand (they're just
> a particular field of a symbol object, which is a kind of "struct").
Stefan, thanks for your answer. I'm not entirely sure I understand it,
but I'm going to give it some thinking, and if it is still unclear, I'll
get back here.
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University