[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Stefan Monnier |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Fri, 26 Oct 2018 11:34:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (pcase this-param
> ('edit (todo-edit-item--text))
> ('header (todo-edit-item--text 'include-header))
> ('multiline (todo-edit-item--text 'multiline))
> ('add/edit (todo-edit-item--text 'comment-edit))
> ('delete (todo-edit-item--text 'comment-delete))
>
> I have a hard time believing that there are more users who find it less
> clear than its cond+eq expansion.
BTW, I just bumped into another benefit of `pcase` for such code:
When I converted a particular cond+eq thingy yesterday, pcase gave me
a warning about redundant pattern, because indeed one of the original
`cond` branches was unreachable.
Stefan
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stephen Berman, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources,
Stefan Monnier <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/27
- Re: Replace trivial pcase occurrences in the Emacs sources, Richard Stallman, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Joost Kremers, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Daniel Pittman, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- pcase pattern syntax (was: Replace trivial pcase occurrences in the Emacs sources), Stefan Monnier, 2018/10/24
- Re: pcase pattern syntax (was: Replace trivial pcase occurrences in the Emacs sources), Joost Kremers, 2018/10/26
- Re: Replace trivial pcase occurrences in the Emacs sources, João Távora, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24