[Top][All Lists]

[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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]