[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Minor simplification in byte-opt.el
From: |
Stefan Monnier |
Subject: |
Re: Minor simplification in byte-opt.el |
Date: |
Tue, 28 Jul 2020 12:08:10 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> We currently do allow it (in the interpreter and the byte-compiler), but
>> I think this is a mistake and we should emit a warning (if not an error)
>> when the byte-compiler encounters such a construct.
>
> Yes, sorry, I meant that I wasn't sure whether could be synthesised (by
> cconv) without the user actually ever feeding an explicit 'closure'
> construct into the compiler. After all, 'closure' isn't really in the
> language, is it?
No, indeed, it's not in the language. The way it usually shows up is
when a macro stuffs a *value* in there, e.g.
`(,(get foo 'frobbing-function) ...)
The more correct alternative
`(funcall ',(get foo 'frobbing-function) ...)
tends to suffer from false-positive warnings about quoted lambdas when
the `frobbing-function` was not byte-compiled and comes from a file that
still doesn't use lexical-binding.
Stefan