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: Garreau\, Alexandre
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Sun, 28 Oct 2018 03:07:27 +0100
User-agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian

On 2018-10-28 at 02:21, Michael Heerdegen wrote:
> Dmitry Gutov <address@hidden> writes:
>
>> We could also assume that the silent majority is okay with the way
>> things are. For example, I like pcase, even if more complex cases
>> might look cryptic.
>
> I also like it, and your assumption could be true.  Who knows.
>
> Pcase was a big improvement to what can be expressed with Elisp.  And I
> think its syntax and semantics are quite straightforward.  I doubt we
> will find something more simplistic that has the same power.
>
> Probably the main problem was that the documentation was originally
> written in a quite terse academic style.  Also, the recursive nature of
> ` that makes it possible to combine it with all other patter types is
> hard to get, but also very natural and powerful.  It's just consistent
> that when backquote is used to construct complicated lists, it is also
> used to build complex patterns to match such lists.  Nonetheless it
> seems that ` is one of the main reasons for the bad feelings some people
> have about pcase.

Isn’t ` needed in just the same cases you could as well use guard or
predefined patterns?  when you need to eval things?  If there is some
redundance or covering between both, maybe ` could be avoided so it
confuses less?



reply via email to

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