[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68028: 29.1; (elisp) `pcase Macro': move `rx' before SEQPAT descript
From: |
Mattias Engdegård |
Subject: |
bug#68028: 29.1; (elisp) `pcase Macro': move `rx' before SEQPAT description |
Date: |
Thu, 28 Dec 2023 11:29:37 +0100 |
27 dec. 2023 kl. 22.47 skrev Stefan Kangas <stefankangas@gmail.com>:
>> Please consider moving the description of `rx' forms from after the
>> description of SEQPAT forms (`and' and `or'). The scope of the latter
>> description is less clear if `rx' follows the descriptions of `and' and
>> `or' (with no particular separation). IOW, separate the SEQPAT
>> description from the other pattern descriptions better.
>
> Mattias, since you added that part, do you have any thoughts?
The location of the `rx` pattern description is fine; it's the SEQPAT paragraph
that causes trouble as it splits the table into two parts.
I suggest we remove that paragraph because it doesn't actually say anything
useful at that point; the user can learn how `or` and `and` patterns work
without knowing that they are SEQPATs. Actually, I'd hoist those two patterns
and reorder them to keep patterns in a rough order of usage: something like
pred, guard, or, and, let, app, rx
makes more sense -- `pred` and `guard` clearly belong together, `app` is less
common than `let`.
We could explain SEQPAT in a short sentence somewhere else, either near the
beginning of the node or further down in the 'Caveats' subsection. A simple
(and probably flawed) patch attached.
Stefan M probably has a better sense of how to improve the text. (By the way,
the caveat section says that sequencing patterns use `eq` for comparison. Don't
they use `eql`?)
seqpat.diff
Description: Binary data