[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pcase-dolist
From: |
Stefan Monnier |
Subject: |
Re: pcase-dolist |
Date: |
Thu, 09 Jul 2015 15:26:42 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> Yes, if you want to pick the first two elements of a list with 2 or more
> elements, you should use `(,w ,x . ,_). I see that the above is
> slightly more convenient and concise but I'd value consistency more.
But that does not match the usual uses of "tuples represented as lists",
where it's customary to use (A B) when the remaining fields are all nil
(since (car nil) returns nil and (nth 5 '(1 2)) also returns nil rather
than signaling an error) and where it's also customary to ignore any
additional element.
IOW maybe your approach seems more consistent, but not only does it
generate less efficient code, but it also requires extra source code in
the usual cases.
Stefan
- Re: pcase-dolist, (continued)
- Re: pcase-dolist, Stefan Monnier, 2015/07/08
- Re: pcase-dolist, Michael Heerdegen, 2015/07/08
- Re: pcase-dolist, Tassilo Horn, 2015/07/08
- Re: pcase-dolist, Stefan Monnier, 2015/07/08
- Re: pcase-dolist, Tassilo Horn, 2015/07/09
- Re: pcase-dolist, Thierry Volpiatto, 2015/07/09
- Re: pcase-dolist, Tassilo Horn, 2015/07/09
- Re: pcase-dolist, Thierry Volpiatto, 2015/07/09
- Re: pcase-dolist, Tassilo Horn, 2015/07/09
- Re: pcase-dolist, Thierry Volpiatto, 2015/07/09
- Re: pcase-dolist,
Stefan Monnier <=
- Re: pcase-dolist, Michael Heerdegen, 2015/07/09
- Re: pcase-dolist, Stefan Monnier, 2015/07/10
- Re: pcase-dolist, Tassilo Horn, 2015/07/10
- Re: pcase-dolist, Stefan Monnier, 2015/07/10
- Re: pcase-dolist, Artur Malabarba, 2015/07/08
- Re: pcase-dolist, Michael Heerdegen, 2015/07/08