Subject: Re: bug#72328: [PATCH] Nested backquote in pcase

From: Michael Heerdegen <[email-masked]>
Date: Fri, 23 Aug 2024 05:25:59 +0200

Eli Zaretskii <[email-masked]> writes:

[I'm trying to keep this discussion alive...]

> > What I question is not Eli's intentions or reasons, but the consequences
> > of complying with those requests: I fear that the moment I start
> > defending and giving justifications for the existence of macroexp-null,
> > this report will forever be reduced to just a "companion patch" whose
> > sole purpose is to make a later patch *look* nice.  My concern is that
> > this will end up the same way me showing no code in melpa would be
> > effected by this patch did - with my case being hurt on false grounds.
>
> You make it sound as if there's some hidden agenda in this discussion.
> There isn't.

Yes, Thuna, from experience I know that the way Eli asks questions for
some people (including myself) sometimes suggests intentions that are
not there.  It's not a mistake to just answer his questions, IME.

> So justification for introducing such change in behavior is actually
> the main point that needs to be discussed, because it will be a main
> factor in the decision whether we want to install such a change.  And
> the justifications that we are interested to hear are the situations
> where using the available behavior would cause such significant
> inconvenience or unclean code that having this new behavior would
> avoid.  Then we will have to decide whether those situations are
> important enough for us to risk the incompatibilities, complicate the
> documentation, add backward-compatibility shims, etc. -- all of which
> make Emacs slightly more complex and slightly harder to maintain.

Would be good to hear from Stefan how he would estimate the risk of
potential incompatibilities.  And the value of the change of semantics.

[ The rest of my message is more or less a summary of aspects already
given, from my perspective. ]

Thinking more about it, from the things I can see, I think I'm in favor
of this change.  In the long run it makes Elisp more consistent.

I don't know how often backquote values are needed to be matched.  I
guess not terribly often.  OTOH, this ,'\, circus really can drive
one crazy, it's not obvious what one needs to do at all to match a
backquote value correctly, so it's also an improvement to enable people
to do this in a reachable way, and the code also gets better readable.

OTOH, I think the current semantics of pcase ` are easier to explain in
a formal way.  Dunno if this is an advantage though, since most people
don't seem to understand them anyway.

Thuna, do you have any other ideas where your patch would be a
significant improvement - practical use cases?  I must admit I'm not yet
completely sure how the impact of the patch would on using el-search
- although I often use it to search backquote expressions.  Guess I'm
too used to the current semantics now :-(  What I can say is that I often
wished that it would be easier, in one way or the other.

Michael.