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: Michael Heerdegen
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Tue, 06 Nov 2018 00:06:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> >> But some of the preds and guards of other branches (both before and
> >> after the one of BODY1) may also be run before getting to BODY1.
> >
> > Does that imply that we also should remove sentences like these from
> > the manual (last line):
> >
> > @item (and @address@hidden)
> > Attempts to match @address@hidden, in order,
> > until one of them fails to match.
> > In that case, @code{and} likewise fails to match,
> > and the rest of the sub-patterns are not tested.
>
> No, that one sounds fine.
> Why do you think it's inconsistent with what I said?

I wondered if what you said about the preds and guards of other branches
is also true about preds and guards in other "branches" in ors and ands.

With other words, I wonder when we say

> > In that case, @code{and} likewise fails to match,
> > and the rest of the sub-patterns are not tested.

if what users expects to be the "rest" of subpatterns is always the
patterns lexically following the one that failed.

Are patterns in or and and always tested in order?  And, if these
include preds or guards, always exactly once?


Michael.



reply via email to

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