help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Is `eval' allowed to modify its argument?


From: Michael Heerdegen
Subject: Re: Is `eval' allowed to modify its argument?
Date: Fri, 13 Nov 2020 12:29:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I can imagine cases where one might think it's a good idea to do so,

I suspect in most cases it happens by accident.  My case is thunk-let*
(AFAIR I was related in implementing it...):

(let ((form '(thunk-let* ((x (+ 1 2))
                          (y (+ x 3)))
               (* x y))))
  (ignore (macroexpand form))
  form)

==>

 (thunk-let*
    ((x
      (+ 1 2))) ;; second binding of FORM is gone!
  (* x y))

So do we consider that a bug in `thunk-let*'?  How much similar cases do
you think can we expect?


Thanks,

Michael.





reply via email to

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