[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: combining cond and let, to replace pcase.
|
From: |
Joost Kremers |
|
Subject: |
Re: combining cond and let, to replace pcase. |
|
Date: |
Sun, 19 Nov 2023 17:03:25 +0100 |
|
User-agent: |
mu4e 1.10.7; emacs 29.1 |
On Sun, Nov 19 2023, Gerd Möllmann wrote:
> But to the full truth also belongs that Richard has stopped programming
> completely in 2008, says he himself, and that he doesn't seem to be very
> familiar with current Elisp, if he's seen pcase for the first time a few
> days ago. One must keep that in mind.
Actually, it's not the first time Richard has seen pcase. There was a very
similar thread to this one in 2018, where he asked about pcase. See e.g.,
<https://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00440.html>:
```
> In what sense is the above cl-case more clear than the pcase equivalent?
> I'm not saying the pcase version is better in those cases, but I think
> the respective advantages and disadvantages pretty much balance out.
I also wonder. Is it simply that people find pcase unfamiliar?
```
I wrote a somewhat lengthy reply to that message trying to pinpoint the things
that I found unintuitive (read: unfamiliar) about pcase's syntax. I won't repeat
the whole thing here (the message can be found here:
https://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00448.html). The gist
of it is that pcase uses a couple of syntax elements that *look* familiar but
don't have their familiar meaning.
That has actually been said in this thread before, so that's no revelation. I do
think the documentation could be improved, however, if it were (re?)written with
that aspect in mind. Or perhaps it would be better to add an introductory
section explaining those aspects.
I'd be willing to give it a shot, BTW, if there's interest. No promise on an
ETA, but I should have some spare time in the coming weeks.
--
Joost Kremers
Life has its moments
- Re: Instead of pcase, (continued)
- combining cond and let, to replace pcase., Richard Stallman, 2023/11/17
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Gerd Möllmann, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Gerd Möllmann, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Gerd Möllmann, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase.,
Joost Kremers <=
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Joost Kremers, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/20
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/20
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/21