[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is `eval' allowed to modify its argument?
From: |
Stefan Monnier |
Subject: |
Re: Is `eval' allowed to modify its argument? |
Date: |
Thu, 12 Nov 2020 17:13:07 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> is `eval' allowed to modify a list specified as FORM argument?
There's nothing that says it's no allowed, I think. It's probably not
very desirable in general, tho I would expect some macros to do it
(e.g. in a previous life I played with a version of `macroexpand` which
modified its argument in place to replace the original code with its
macro-expanded form: I was considering it as an optimization to speed up
execution of non-byte-compiled loops by avoiding the re-expansion of
macro invocations in the body).
> It seems to happen to me in one case.
I can imagine cases where one might think it's a good idea to do so, but
I suspect that in practice it probably always ends up being a bad idea,
so you might like to report it as a ... let's not call it a bug but
a "sign that something's fishy"?
Stefan