From: Neil Jerram <neiljerram@gmail.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Remove redundant 'function's around lambda
Date: Thu, 19 Nov 2020 15:16:10 +0000 [thread overview]
Message-ID: <CAKuG=vuUWUJU_4m9c8XLhM6QBDUnRiU6GNWLqqvp=qWRHaZ3Vw@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmn_bH0k+f50ST8cv1M4azsNmKdvXjbsDS2uHHAqmi-RFg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
On Thu, 19 Nov 2020 at 14:51, Stefan Kangas <stefan@marxist.se> wrote:
> Neil Jerram <neiljerram@gmail.com> writes:
>
> >> I've been working on removing redundant `function' around `lambda' in
> >> Emacs core,
> >
> > I'm slightly curious about the history and reasoning around this. If I
> > understand correctly, (lambda ...) on its own has always worked, and it's
> > never been strictly necessary to add (quote ...) or (function ...) around
> > it. Then sometime (Emacs 19 or later, I think) it started being
> > recommended to use (function ...).
> >
> > Do you know why that recommendation started, and should I understand that
> > the reasoning for it has now evaporated?
>
> Correct, there is no reason to do this.
>
> I don't know the history here, and there are people on emacs-devel that
> would know better.
>
> I _suspect_ that the byte-compiler first got the capability to optimize
> calls to anonymous functions, but that it required to explicitly marked
> as such with `function'. Later, it grew the capability to recognize
> lambda as such automatically. But I don't know if that is correct; it's
> just a guess. In any case, they are no longer needed as lambda and
> lambda+function are equivalent.
>
> (Note that the worst thing here is to do `(quote (lambda ...))' as that
> defeats byte-compiler optimizations altogether.)
>
Many thanks Stefan!
[-- Attachment #2: Type: text/html, Size: 1901 bytes --]
prev parent reply other threads:[~2020-11-19 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-17 16:55 [PATCH] Remove redundant 'function's around lambda Stefan Kangas
2020-11-19 3:07 ` Kyle Meyer
2020-11-19 3:44 ` Stefan Kangas
2020-12-14 6:49 ` Bastien
2020-12-23 5:11 ` Kyle Meyer
2020-11-19 10:44 ` Neil Jerram
2020-11-19 14:51 ` Stefan Kangas
2020-11-19 15:16 ` Neil Jerram [this message]
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKuG=vuUWUJU_4m9c8XLhM6QBDUnRiU6GNWLqqvp=qWRHaZ3Vw@mail.gmail.com' \
--to=neiljerram@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=stefan@marxist.se \
/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/org-mode.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).