From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Minor simplification in byte-opt.el
Date: Tue, 28 Jul 2020 12:08:10 -0400 [thread overview]
Message-ID: <jwveeovbp9c.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <F28E6748-BBA3-4B1F-B317-2706E0416F4D@acm.org> ("Mattias Engdegård"'s message of "Tue, 28 Jul 2020 17:18:01 +0200")
>> 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
prev parent reply other threads:[~2020-07-28 16:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-26 20:41 Minor simplification in byte-opt.el Stefan Monnier
2020-07-27 9:38 ` Mattias Engdegård
2020-07-27 14:24 ` Stefan Monnier
2020-07-28 14:43 ` Mattias Engdegård
2020-07-28 14:53 ` Stefan Monnier
2020-07-28 15:18 ` Mattias Engdegård
2020-07-28 16:08 ` Stefan Monnier [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.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=jwveeovbp9c.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.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 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).