[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instead of pcase
From: |
João Távora |
Subject: |
Re: Instead of pcase |
Date: |
Fri, 1 Dec 2023 18:45:48 +0000 |
On Fri, Dec 1, 2023 at 6:28 PM Dmitry Gutov <dmitry@gutov.dev> wrote:
> That just reaffirms my understanding that the main problem with 'pcase'
> that we have is documentation. The nodes are written very bottom-up,
> whereas what's really needed for someone to understand the core usage,
> would look more like the first half of the node "Destructuring with
> ‘pcase’ Patterns".
+1
Instead of "11.4 Pattern-Matching Conditional", that section could
be called "Pcase and friends" or "The pcase family of macros family".
Though it is original use of pcase, pcase conditionals are just one
of the things you can do with it, and in my recent experience, not
necessarily the most common or useful one. Also 'pcase-let' is
probably easier to understand than 'pcase', as it only does
destructuring and binding whereas the other macros do that and something
more on top.
Besides renaming, that section could start with a 11.4.1 "quick-start"
with some brief explanation about how pcase relates to backquote-and-tick
and with an example for 'pcase-let', not unlike the one that surfaced here.
If space allows, an example for 'pcase' that introduces the conditional
macro can be added.
João
Re: Instead of pcase, Andreas Schwab, 2023/12/01
Re: Instead of pcase, João Távora, 2023/12/01
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Dmitry Gutov, 2023/12/01
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Dmitry Gutov, 2023/12/01
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase,
João Távora <=
Re: Instead of pcase, João Távora, 2023/12/01
Re: Instead of pcase, Andreas Schwab, 2023/12/01
Re: Instead of pcase, Michael Heerdegen, 2023/12/01
Re: Instead of pcase, Eli Zaretskii, 2023/12/01
Re: Instead of pcase, Richard Stallman, 2023/12/01