From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: The poor state of documentation of pcase like things. Date: Wed, 23 Dec 2015 22:15:01 -0800 Message-ID: References: <20151216202605.GA3752@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450937725 18406 80.91.229.3 (24 Dec 2015 06:15:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Dec 2015 06:15:25 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org, kaushal.modi@gmail.com To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 24 07:15:17 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 1aBzBF-0003FE-9V for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2015 07:15:17 +0100 Original-Received: from localhost ([::1]:59138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBzBE-0006FI-KM for ged-emacs-devel@m.gmane.org; Thu, 24 Dec 2015 01:15:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBzBA-0006CC-AY for emacs-devel@gnu.org; Thu, 24 Dec 2015 01:15:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBzB7-00062h-0m for emacs-devel@gnu.org; Thu, 24 Dec 2015 01:15:12 -0500 Original-Received: from mail-pf0-x22c.google.com ([2607:f8b0:400e:c00::22c]:36444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBzB6-00062J-RS; Thu, 24 Dec 2015 01:15:08 -0500 Original-Received: by mail-pf0-x22c.google.com with SMTP id 65so19344217pff.3; Wed, 23 Dec 2015 22:15:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version:content-type; bh=MFGeTs8VJWwSw05KlEpUm60DvKFobvDRDK2qm5A+eRg=; b=DmWEXkT+Imo0++eAv5IUYM+E1bB29+ShJtG/qS10yPJsnu/4rymVp3w9w3IcZwhteb t3RAhFZ4yn2gA+pRW0FPOvOWKDFUE9uSms71EvJk9ty7AICao95VsSrl0fwQvpIE2NcT ICCHf/I12b5Gqpf0UrK8z5gFOb2sCHKb/WO5HnQwA+LMFJbq3xXQR1ZYUNq/KELwnOnr khcmTdDtr2gZa4nQZODx8+9u1us7KpkmnhFB7Oca8qkoSoWJrTAafMBnzBHqzKAuQ4Vp cMZdf0P5fIjPsncjXDlG5O4FO+GTZNRbAMzqq3c3nvwJJ+c+s7aDtfVD/Ug3a0bPLT5S BNZA== X-Received: by 10.98.14.211 with SMTP id 80mr50630093pfo.76.1450937708333; Wed, 23 Dec 2015 22:15:08 -0800 (PST) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id g68sm14601339pfd.55.2015.12.23.22.15.07 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 23 Dec 2015 22:15:07 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 7FD6711AD0F36; Wed, 23 Dec 2015 22:15:06 -0800 (PST) In-Reply-To: (Richard Stallman's message of "Thu, 24 Dec 2015 00:49:40 -0500") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Mail-Followup-To: Richard Stallman , kaushal.modi@gmail.com, acm@muc.de, emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22c 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:196755 Archived-At: >>>>> Richard Stallman writes: > Is _ as wildcard a UPattern? In other words, should this >> (pcase value >> (`(_ 1 2) >> (message "Matched a list of anything followed by (2 3)"))) > really be this? >> (pcase value >> (`(,_ 1 2) >> (message "Matched a list of anything followed by (2 3)"))) > If so, now the description makes sense. Yes, this is correct. > But I think it might be useful to define _ > as a QPattern to be equivalent to ,_. > It is true that this would make it an exception among QPatterns, > but one exception might be worth while. I don't see much value in doing so; is it just to save a comma? -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2