unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <basil@contovou.net>
To: 69533@debbugs.gnu.org
Cc: "Michael Heerdegen" <michael_heerdegen@web.de>,
	"Mattias Engdegård" <mattiase@acm.org>
Subject: bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax
Date: Mon, 04 Mar 2024 08:46:54 +0100	[thread overview]
Message-ID: <87r0gqa175.fsf@epfl.ch> (raw)
In-Reply-To: <8734t6shpa.fsf@web.de> (Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors"'s message of "Mon, 04 Mar 2024 06:13:05 +0100")

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	other threads:[~2024-03-04  7:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04  1:51 bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04  3:39 ` Drew Adams
2024-03-04  4:40   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04 15:52     ` Drew Adams
2024-03-04  5:13 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04  7:46   ` Basil L. Contovounesios [this message]
2024-03-04  8:10     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04  8:47       ` Basil L. Contovounesios
2024-03-04  8:17     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-04  8:48       ` Basil L. Contovounesios
2024-03-04  9:39     ` Andreas Schwab
2024-03-04 12:52       ` Basil L. Contovounesios
2024-03-04 13:13         ` Mattias Engdegård
2024-03-04 13:25           ` Mattias Engdegård
2024-03-04 21:12             ` Drew Adams
2024-03-14  7:52 ` Eli Zaretskii
2024-03-14  8:44   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-14 11:13     ` Eli Zaretskii
2024-03-14 11:18       ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0gqa175.fsf@epfl.ch \
    --to=basil@contovou.net \
    --cc=69533@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).