all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Michael Heerdegen <michael_heerdegen@web.de>,
	"69533@debbugs.gnu.org" <69533@debbugs.gnu.org>
Cc: "rms@gnu.org" <rms@gnu.org>
Subject: bug#69533: 30.0.50; Wrong byte compilation of a certain apply syntax
Date: Mon, 4 Mar 2024 03:39:46 +0000	[thread overview]
Message-ID: <SJ0PR10MB548873248FF132C7D8FB27A6F3232@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <8734t6n4r5.fsf@web.de>

> | With a single argument, call the argument's
> | first element using the other elements as args.

> ...
> That sentence actually explains a special case:
> it tells that this is also allowed:
>   (apply '(+ 1 2)) ==> 3

FWIW, I'm very surprised to find this "feature".
That it's documented suggests it was intended.
But I don't know why it would be.  Does anyone?
What's the use case for not requiring the first
arg to be a function?

No Lisp that I'm aware of, starting with Lisp 1,
has ever supported such a feature - at least not
according to its doc.

Ccing RMS, who might know why, if this has been
in Elisp since Day One or it was added long ago.
___

Aha, I see now - found it.  It was added in Emacs
28.1.

And this text was added then to the Elisp manual:

  ‘apply’ with a single argument is special:
  the first element of the argument, which
  must be a non-empty list, is called as a
  function with the remaining elements as
  individual arguments.  Passing two or more
  arguments will be faster.

And this additional example was added there:

    (apply '(+ 3 4))
         ⇒ 7

But why?  There's nothing in NEWS about this.
Was it even discussed? (Probably, but maybe
only in a bug thread?)

None of the rest of the text is changed -
just what I've mentioned here.

I don't understand why anyone considered it
a good idea to change the behavior of `apply'
(in this way or in any other way).  What
gives?

"Special" is indeed one way to characterize
it.  More like "shocking". ;-)  What's next?

And this bug is about the behavior not even
faithfully reflecting that doc?  Sheesh.

Was this done on April 1?





  reply	other threads:[~2024-03-04  3:39 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 [this message]
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
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

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

  git send-email \
    --in-reply-to=SJ0PR10MB548873248FF132C7D8FB27A6F3232@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=69533@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=rms@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.