[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Garreau\, Alexandre |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Thu, 01 Nov 2018 01:16:01 +0100 |
User-agent: |
Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian |
On 2018-10-30 at 09:07, Stefan Monnier wrote:
>> In fact, when you think about it, the "case" nature of pcase is pretty
>> orthogonal to the "match/destructure" nature of pcase. If anything
>
> How do you suggest to split the two in cases like:
>
> […]
Wouldn’t a “cl-case :test #'match ...”, where each `match' would be the
simple-destructuring case-less version of `pcase' and `cl-case' would
manage `:test' optional keyword, work? As for using bindings, either
modifying cl-case (maybe getting it able to use external hooks?), either
with ugly side effects (replacing “#'match” per “(lambda (arg) (setq
local-pattern-env (match arg)))”, then wrapping bodies with a “let-alist
local-pattern-env”) (and making that a macro, but agreed it would be
ugly and not optimized)?
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Eric Abrahamsen, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Eric Abrahamsen, 2018/10/29
- `pcase'/`case' implementation [Was: Re: Replace trivial pcase occurrences in the Emacs sources], Garreau\, Alexandre, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eric Abrahamsen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources,
Garreau\, Alexandre <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Dmitry Gutov, 2018/10/30