[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly
From: |
Ihor Radchenko |
Subject: |
bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly |
Date: |
Mon, 19 Feb 2024 18:16:37 +0000 |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> The difficulty in resolving this can be illustrated with the following
> pattern:
>
> `(a . ,b)
>
> This pattern leads to two tests: (consp VAL) and (eq 'a (car VAL)).
> When destructuring, we want to throw away both tests (we want to throw
> away most tests, except those needed to choose between two `or`
> branches).
>
> We could decide to emit a warning because we silently skip
> the `eq` test, which would help the coders understand that the pattern
> doesn't do what they think.
> But emitting that same warning because we silently skip the `consp` test
> would be really annoying because rewriting the pattern to avoid this
> is impractical.
May you please elaborate how this example is related to destructuring
from user perspective? It appears to me that you are talking about
implementation details of `pcase', which are elusive to me.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, (continued)
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Stefan Monnier, 2024/02/20
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Ihor Radchenko, 2024/02/20
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Stefan Monnier, 2024/02/20
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Ihor Radchenko, 2024/02/21
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Stefan Monnier, 2024/02/21
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Ihor Radchenko, 2024/02/23
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Stefan Monnier, 2024/02/23
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Ihor Radchenko, 2024/02/24
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Stefan Monnier, 2024/02/24
bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly, Stefan Monnier, 2024/02/19
- bug#68509: 30.0.50; pcase-dolist matches backquote pattern incorrectly,
Ihor Radchenko <=