[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: combining cond and let, to replace pcase.
From: |
Michael Heerdegen |
Subject: |
Re: combining cond and let, to replace pcase. |
Date: |
Sun, 19 Nov 2023 13:50:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
> > To sum up, I question your premise of this discussion.
>
> Don't. It's a real issue. Maybe not for you, but for some others.
> No one in their right mind would assume that Richard has "a problem
> understanding the abstract approach". Just look at which pieces of
> software he wrote and the various DSLs he designed while at that. So
> when Richard, of all the people, tells us there's a problem, I suggest
> that we listen, especially since a few other veteran Emacs developers,
> who are not unfamiliar with Emacs Lisp and its subtleties, tell
> something similar if not identical.
There is a problem. And I see it. I already said that.
But the problem is "some people can't read pcase calls well". The
problem is not "pcase is bad". The latter is a subjective conclusion,
and this is the part I do not accept as objective truth.
And this makes a difference to how we aim to find a solution. Maybe we
people actually understanding pcase could also contribute something to a
solution? This is not possible if "pcase is badly designed" is the
starting point of the discussion that everybody should take as granted
objective truth that is meant to be blindly accepted - I don't do that.
I accept that people having a problem reading code involving pcase is a
problem.
> The same is true for regular expressions. But we still have rx, and
> some people really prefer it. Maybe this imperfect analogy will help
> you understand the issue with pcase.
This is an excellent analogy. Which one is the counterpart to `pcase'?
`rx' or the string form?
Actually both and none, this is exactly the point I raised in my other
reply - both have exactly the same complexity, and it is totally
subjective and only habit which one you prefer. The amount of knowledge
you need to remember, the amount of documentation you need to consult,
is the same. And although the string form is normal Lisp (strings are
expressions), this fact makes the thing not any easier to use, not a
tiny bit. The complexity is in the task. And hidden in the algorithm
that runs after you have specified the pattern/the regexp in whatever
language you prefer.
Michael.
- Re: combining cond and let, to replace pcase., (continued)
- 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, 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, 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 <=
- 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
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/21
- Re: combining cond and let, to replace pcase., Dmitry Gutov, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Dmitry Gutov, 2023/11/19