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

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

bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax


From: Basil L. Contovounesios
Subject: bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax
Date: Mon, 04 Mar 2024 08:46:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen [2024-03-04 06:13 +0100] wrote:

> Michael Heerdegen <bug-gnu-emacs@gnu.org> writes:
>
>> (byte-optimize-apply '(apply '(+ 1 2)))
>>  ==> (funcall '(+ 1 2) '+ '1 '2) ; Ouch!
>
> I'm adding Mattias to the discussion - he had changed
> `byte-optimize-apply' after this new convention (which I find
> irritating, too) had been introduced.

Just curious: which convention are you referring to, and why do you say
it's new?  AFAICT the only recent Emacs version which accepted
(apply '(+ 1 2)) without any complaint is Emacs 28.

> I guess since byte compilation of such forms is (at least partly)
> broken, not many people are actually using it.

FWIW, my guilty pleasure is using this calling convention with
a non-literal form, e.g.:

  (define-advice foo (:around (&rest args) my-foo)
    (with-something (apply args)))

This has always byte-compiled without issue.
Of course, I'm not married to this convention.

Thanks,
-- 
Basil





reply via email to

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