From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Okamsn <okamsn@protonmail.com>, 67611@debbugs.gnu.org
Subject: bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind`
Date: Tue, 5 Dec 2023 09:21:47 +0000 [thread overview]
Message-ID: <CALDnm52imqDaends1AEiZH9WYh6YN8tFosyYCzexH6F5=GWKwA@mail.gmail.com> (raw)
In-Reply-To: <jwvplzllrrm.fsf-monnier+emacs@gnu.org>
On Mon, Dec 4, 2023 at 7:09 PM Stefan Monnier via Bug reports for GNU
Emacs, the Swiss army knife of text editors <bug-gnu-emacs@gnu.org>
wrote:
>
> > The attached patch adds the pattern `cl-lambda` for Pcase, which works
> > like `cl-destructuring-bind`. There are two differences with the lambda
> > lists:
>
> Hmm... I'm not sure mixing the CL destructuring patterns with the Pcase
> patterns (both of which are rather featureful and complex) will help
> their popularity.
>
> Beside that problem (which means I'm not very favorable to the
> addition), the name should be changed because "lambda" is misleading.
> It suggests this has to do with a function (I had to read the code to
> understand what this is doing).
>
> > The pattern is useful when one wants to combine the features of `pcase`
> > and `cl-destructuring-bind`, such combining the optional values with the
> > `pred` or `guard` patterns.
>
> Do you have examples uses?
I for one would like to see some examples too. Okamsn's description
of this pcase extension sounds interesting. In fact, it sounds very
much like the slime-dcase and sly-dcase macros in SLIME and SLY
respectively.
João
next prev parent reply other threads:[~2023-12-05 9:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 20:33 bug#67611: [PATCH] Add a Pcase pattern `cl-lambda` equivalent to `cl-destructuring-bind` Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-04 19:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-05 2:42 ` Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-05 9:26 ` João Távora
2023-12-05 9:21 ` João Távora [this message]
2023-12-25 21:30 ` Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-11 21:12 ` Stefan Kangas
2024-01-11 21:56 ` João Távora
2024-01-11 22:13 ` Stefan Kangas
2024-01-11 22:46 ` João Távora
2024-01-12 0:55 ` Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-13 6:38 ` Stefan Kangas
2024-01-12 3:04 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 10:46 ` João Távora
2024-01-12 15:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-12 16:56 ` João Távora
2024-01-13 6:58 ` Stefan Kangas
2024-01-14 3:08 ` Richard Stallman
2024-01-14 3:12 ` João Távora
2024-01-17 3:29 ` Richard Stallman
2024-01-17 9:12 ` João Távora
2024-02-08 3:49 ` Richard Stallman
2024-02-08 13:41 ` João Távora
2024-02-11 3:28 ` Richard Stallman
2024-02-12 15:25 ` João Távora
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='CALDnm52imqDaends1AEiZH9WYh6YN8tFosyYCzexH6F5=GWKwA@mail.gmail.com' \
--to=joaotavora@gmail.com \
--cc=67611@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=okamsn@protonmail.com \
/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).