GNU bug report logs - #70597
Problem in pcase-let?

Previous Next

Package: emacs;

Reported by: Marco Antoniotti <marcoxa <at> gmail.com>

Date: Fri, 26 Apr 2024 21:15:08 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Marco Antoniotti <marcoxa <at> gmail.com>
Cc: Bruno Barbier <brubar.cs <at> gmail.com>, 70597 <at> debbugs.gnu.org
Subject: bug#70597: Problem in pcase-let?
Date: Sun, 28 Apr 2024 11:22:37 -0400
> Pattern matchers do ... pattern matching.

`pcase` is a pattern matcher.
`pcase-let` is not: it performs "destructuring bindings".

If you want to test if a pattern matches, then you want to use `pcase`
or `pcase-exhaustive`, and not `pcase-let`.

If you want a "one-branch `pcase-exhaustive` with a let-style notation",
we could add such a thing of course, but I'd first like to see some
evidence that it's useful in practice.


        Stefan





This bug report was last modified 1 year and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.