emacs-devel
[Top][All Lists]
Advanced

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

Re: Instead of pcase


From: Michael Heerdegen
Subject: Re: Instead of pcase
Date: Mon, 20 Nov 2023 15:52:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

> > I'm curious how an alternative could look like, actually.
>
> I don't know.  So I withdraw my judgment until such an alternative is
> presented.  I suggest that everyone do the same.
>
> > It would have to implement the same set of features, so it would be
> > quite as complex as `pcase'.
>
> Complexity doesn't necessarily mean cryptic syntax.  Cf regexp strings
> vs Rx.

If you meant to imply that pcase has a unnecessarily "cryptic syntax",
this is a judgment.  If you wish that the syntax should be more like
human language, or more verbose, or less like a new mini-language, this
is an opinion.  Which is ok.  But not as neutral as your first sentence
suggests.  Still fine by me.

But when this is a opinion, and other people differ, we also should
speak about the disadvantages of a different approach.  For example, if
we replace the backquote syntax with something that looks more like
function calls, it would be less obvious at which depth and which
position a subpattern is matched.  Since pcase has been introduced to
make specification of complex, nested patterns easier and more compact
to read, we will lose this advantage.  The syntax might be easier to
learn, but code will be harder to maintain and tweak.  At least for me.

But I repeat myself.  I guess it's clear to you what I want to say, so
you don't need to waste your time to reply, unless you disagree or like
to do so nonetheless of course.

Michael.




reply via email to

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