emacs-devel
[Top][All Lists]
Advanced

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

Re: Replace trivial pcase occurrences in the Emacs sources


From: Andy Moreton
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Fri, 26 Oct 2018 00:53:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Thu 25 Oct 2018, Stefan Monnier wrote:

>> This raises the question: can we develop a clearer alternative spec
>> for a new constuct?  Would people like to try out various alternatives?
>
> Indeed, this can be done without having to re-implement the underlying
> machinery since you can easily use a macro-layer on top of pcase
> (either via normal defmacro or via pcase-defmacro, or both).

...which does not help existing users, who are still dealing with
inadequate documentation of the pcase family of macros, and with the
baffling syntax. pcase-lambda, pcase-let, pcase-let*, and pcase-dolist
still have no meaningful documentation, and are not even mentioned in
the manual.

Pattern matching is a useful facility, but pcase is woefully hard to use
correctly, as the existing (mis-)usage shows. Something that is
significantly easier to read and comprehend is needed.

    AndyM




reply via email to

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