[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pcase-if-let?
From: |
Stefan Monnier |
Subject: |
Re: pcase-if-let? |
Date: |
Thu, 29 Mar 2018 00:53:29 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Yes, your are right with everything, the names are nonsense. I guess we
> are still in some kind of intermediate state - AFAIK Stefan hopes to
> integrate the pcase stuff more into Emacs innards some day. Dealing
> with these wide problems is not what I want to do here. For now, I just
> want to be consistent with the existing naming scheme.
FWIW, I'm a bit worried about this case: it's not like this pcase-if is
a "pcase version of some existing construct", so if we ever want to get
rid of the "pcase-" prefix on it, we'll have to invent a new name
for it.
IOW it's different from pcase-let and pcase-dolist which are
designed to be "replacements" for let/dolist.
Stefan
PS: Regarding the "unorthodox" shape of the pcase construct, you could
generate an expression of the form (pcase (list E1 E2 ...) ((list P1 P2
...) THEN) (_ ELSE)). It would be a good opportunity to try and fix
pcase so that it generates efficient code for such uses (i.e. it
shouldn't build the list only to then check it). There are already uses
of pcase that would benefit from it, typically for smie-rules-function
where we often do (pcase (cons kind token) ...).
- pcase-if-let?, Michael Heerdegen, 2018/03/28
- Re: pcase-if-let?, Davis Herring, 2018/03/28
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/28
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/28
- RE: pcase-if-let?, Drew Adams, 2018/03/29
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/29
- RE: pcase-if-let?, Drew Adams, 2018/03/29
- Re: pcase-if-let?,
Stefan Monnier <=
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/29
- Re: pcase-if-let?, Stefan Monnier, 2018/03/29
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/29
- RE: pcase-if-let?, Drew Adams, 2018/03/30
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/30
- RE: pcase-if-let?, Drew Adams, 2018/03/30
- Re: pcase-if-let?, Michael Heerdegen, 2018/03/30