emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code for cond*


From: Alan Mackenzie
Subject: Re: Code for cond*
Date: Sun, 25 Feb 2024 17:22:20 +0000

Hello, Stefan.

On Sun, Feb 25, 2024 at 10:38:46 -0500, Stefan Monnier wrote:
> > On a slightly different topic, when will cond* be added/commited to
> > GNU Emacs?  Seeing that how cond* works, and documentation has
> > slightly materialized, it would be good to get some milage.

I agree.

> 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.  The pcase machinery
is almost entirely undocumented (and even the "almost" might be an
exaggeration), and that doesn't look like changing any time soon.

Debugging pcase itself, or a backtrace involving one of its expansions
are thus difficult unpleasant tasks.  (I speak from experience.)

cond* looks like being better on the first point, and might well be
better on the second.  Those putative advantages would be lost by basing
cond*'s implementation on pcase.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]