[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quic
From: |
Jose A Ortega Ruiz |
Subject: |
Re: [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quick fix for previous change |
Date: |
Fri, 28 Jan 2022 20:47:02 +0000 |
On Fri, Jan 28 2022, Stefan Monnier wrote:
>> (let ((v (cadr m)))
>> - (if (functionp v) m
>> - `(,(car m)
>> - ,(lambda (&rest _) v))))))
>> + (if (functionp v) m `(,(car m) (lambda (&rest _) ,v))))))
>
> But this reintroduces the use of a list-that-looks-like-a-function
> instead of a true function.
yes... i just wanted to push quickly a fix for users of the unstable
version, and then think about it.
>
> BTW, one difference I can see is that the new code will basically pass
> `v` to `eval` whereas the code I had sent considers `v` to be
> a value already.
yes, that's the problem: v is the name of a variable, and we want to
evaluate its value when the function being defined is called, not when
the function is defined.
> So maybe the code I should have sent is along the lines of the
> patch below?
yes, that works, but i find it ugly to use eval explictly for the sake
of not using "a list-that-looks-like-a-function": what are the downsides
of the latter? i understand that i'd be just hiding an implicit eval,
but is that all, or am i missing other drawbacks? (isn't, loosely
speaking, hiding evals one of things macros buy us?... the
version without eval looks more readable to me).
thanks,
jao
--
God is real, unless declared integer.