emacs-devel
[Top][All Lists]
Advanced

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

Re: master 9c82f480590: Move and edit text about lexical environment rep


From: Michael Heerdegen
Subject: Re: master 9c82f480590: Move and edit text about lexical environment representation
Date: Mon, 23 Oct 2023 05:50:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Mattias Engdegård <mattiase@acm.org> writes:

> > I have two questions/things that are unclear to me: First, the docstring
> > of `eval' talks about LEXICAL as an "alist mapping" which seems not to
> > be exact if it is allowed to contain plain symbols.  Should the
> > docstring be clarified as well?
>
> Probably, yes. Doc strings are often somewhat simplified but a little
> accuracy wouldn't cost us much here.

Ok.  Should you find some time, maybe you could do that?

> > Second: you wrote "or a symbol representing a dynamically bound
> > variable".  Does this variable really have to be bound (to a value), or
> > do you mean "dynamically binding" (aka special)?
>
> The latter: it represents a (defvar SYMBOL) declaration at that point.
> The parameter has exactly the same type as
> internal-interpreter-environment which is described in a comment in
> eval.c.

Is "dynamically bound" a good choice of language, then, or would
"dynamically binding" or something else (like "indicating that this
variable should use dynamic scoping" in the comment you mentioned) be
a bit clearer?

> No, you are right. Example:
>
> (defun pz () (defvar z) z)
>
> (eval '(let ((z 3)) z) t)  => 3
> (eval 'z '((z . 4)))  => 4
> (eval '(let ((z 5)) (pz)) t)  => (void-variable z)
> (eval '(let ((z 6)) (pz)) '(z))  => 6

Thanks.  Ok, good, that's all as expected.


Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]