From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
Stefan Kangas <stefan@marxist.se>,
34481@debbugs.gnu.org
Subject: bug#34481: 27.0.50; cl-flet, cl-labels and lambda expressions
Date: Mon, 01 Mar 2021 21:41:18 -0500 [thread overview]
Message-ID: <jwva6rmnuz8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87czwizb78.fsf@web.de> (Michael Heerdegen's message of "Tue, 02 Mar 2021 00:49:31 +0100")
>> Just because it's not a part of Common Lisp -- I think people expect
>> the cl-* functions to be a subset of CL syntax, not a superset.
> For cl-flet, we already have it, and it's a useful extension. For
> cl-labels, I don't care that much, and allowing arbitrary
> function-valued expressions does not even make sense for it.
`letrec` does allow function-valued expressions, so `cl-labels` could
just as well. But it's rarely useful, indeed.
> But for macrolet I guess it could make sense (does CL have macrolet?).
It can be useful, but it can only depend on values that exist at
macro-expansion time. In practice, all the use cases I know are for use
where `cl-macrolet` would be used in the output of a macro, so it's just
as easy (if not easier) to call `macroexpand-all` directly, passing it
the environment you want.
Hence the difference between `cl-flet` and the other two: I have come up
with an actual case where it's useful to have `cl-flet` bind the
function name to a "computed function" (IIRC this came up while coding
`cl-generic.el`), whereas I haven't come across such a need for
`cl-labels` or `cl-macrolet` yet.
Stefan
prev parent reply other threads:[~2021-03-02 2:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 2:09 bug#34481: 27.0.50; cl-flet, cl-labels and lambda expressions Michael Heerdegen
2019-02-19 0:22 ` Michael Heerdegen
2019-02-19 1:03 ` Michael Heerdegen
2019-02-19 2:36 ` Michael Heerdegen
2019-10-03 22:28 ` Stefan Kangas
2019-10-17 10:36 ` Michael Heerdegen
2019-10-17 10:45 ` Stefan Kangas
2019-10-17 12:31 ` Michael Heerdegen
2019-10-17 18:20 ` Michael Heerdegen
2019-11-07 13:44 ` Stefan Kangas
2021-03-01 15:53 ` Lars Ingebrigtsen
2021-03-01 16:23 ` Stefan Monnier
2021-03-01 23:15 ` Michael Heerdegen
2021-03-01 23:18 ` Michael Heerdegen
2021-03-01 23:29 ` Lars Ingebrigtsen
2021-03-01 23:49 ` Michael Heerdegen
2021-03-02 1:11 ` Michael Heerdegen
2021-03-02 6:53 ` Lars Ingebrigtsen
2021-03-02 2:41 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwva6rmnuz8.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=34481@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=michael_heerdegen@web.de \
--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 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.