From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: pcase-dolist Date: Thu, 09 Jul 2015 15:26:42 -0400 Message-ID: References: <87wpyaet7r.fsf@web.de> <87y4iqh7x0.fsf@web.de> <87oajmld49.fsf@gnu.org> <87oajlyif9.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436470021 15201 80.91.229.3 (9 Jul 2015 19:27:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jul 2015 19:27:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 09 21:26:53 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZDHTA-0004t2-Rz for ged-emacs-devel@m.gmane.org; Thu, 09 Jul 2015 21:26:53 +0200 Original-Received: from localhost ([::1]:41508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDHTA-0004jN-7V for ged-emacs-devel@m.gmane.org; Thu, 09 Jul 2015 15:26:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDHT7-0004jF-KA for emacs-devel@gnu.org; Thu, 09 Jul 2015 15:26:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDHT3-0007ik-JM for emacs-devel@gnu.org; Thu, 09 Jul 2015 15:26:49 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:46779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDHT3-0007ie-EP for emacs-devel@gnu.org; Thu, 09 Jul 2015 15:26:45 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t69JQgOY018977; Thu, 9 Jul 2015 15:26:42 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B0F6E660ED; Thu, 9 Jul 2015 15:26:42 -0400 (EDT) In-Reply-To: <87oajlyif9.fsf@gnu.org> (Tassilo Horn's message of "Thu, 09 Jul 2015 08:05:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5362=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5362> : inlines <3356> : streams <1468976> : uri <1980800> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187793 Archived-At: > 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