[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Code for cond*
From: |
Stefan Monnier |
Subject: |
Re: Code for cond* |
Date: |
Sun, 25 Feb 2024 13:13:38 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> > FWIW, I'm opposed to adding it without first unifying the Pcase and
> > `match*` pattern languages (including making sure that third party
> > packages which define their own patterns don't need to define them
> > separately for `pcase` and for `match*`).
>
> > [ It's trivial to do by making `match*` reuse the Pcase machinery, so
> > there is no serious obstacle for that. ]
>
> I hope that cond* won't be written on top of pcase.
[ Side note: my comment above specifically refers to `match*`,
not to `cond*`. Let's not confuse the two: `cond*` is an actual
addition, whereas `match*` mostly reinvents Pcase patterns, with a few
tweaks to some of its syntax. ]
I don't have a strong opinion on that, actually.
I hope that we don't end up having to maintain two implementations of
the pattern matching code, but there can be good arguments for such
a duplication (there are several different implementation strategies,
each with their own advantages), so if that's what it takes, I'm OK
with it.
> and maybe even that that pcase could be rewritten using cond*.
As already mentioned in this long thread, the current `match*`
implementation does not generate good enough code for existing `pcase`
uses (and fixing that probably requires non-trivial changes).
Stefan
- Re: Code for cond*, (continued)
- Re: Code for cond*, Stefan Monnier, 2024/02/12
- Re: Code for cond*, Richard Stallman, 2024/02/22
- Re: Code for cond*, Stefan Monnier, 2024/02/23
- Re: Code for cond*, Richard Stallman, 2024/02/24
- Re: Code for cond*, Alfred M. Szmidt, 2024/02/25
- Re: Code for cond*, Stefan Monnier, 2024/02/25
- Re: Code for cond*, Alfred M. Szmidt, 2024/02/25
- Re: Code for cond*, Stefan Monnier, 2024/02/25
- Re: Code for cond*, Alan Mackenzie, 2024/02/25
- Re: Code for cond*, Alfred M. Szmidt, 2024/02/25
- Re: Code for cond*,
Stefan Monnier <=
- Re: Code for cond*, Stefan Monnier, 2024/02/25
- Re: Code for cond*, Richard Stallman, 2024/02/26
Re: Code for cond*, Richard Stallman, 2024/02/22