From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Garreau\, Alexandre" Newsgroups: gmane.emacs.devel Subject: Re: pcase ` meaning Date: Thu, 01 Nov 2018 15:11:10 +0100 Message-ID: <87efc4ga69.fsf@portable.galex-713.eu> References: <20151216202605.GA3752@acm.fritz.box> <87h9iunkcg.fsf@web.de> <87h8hc4xw2.fsf_-_@web.de> <83tvlcsnee.fsf@gnu.org> <87pnw037ar.fsf@web.de> <83ftwvs7y9.fsf@gnu.org> <877ei7mkfh.fsf@web.de> <87a7mze7tl.fsf@web.de> <87zhuykjjh.fsf@web.de> <871s8aesdc.fsf@portable.galex-713.eu> <87tvl6dc3e.fsf_-_@portable.galex-713.eu> <87efc9isxj.fsf@web.de> <87tvl5653j.fsf@portable.galex-713.eu> <38aa830d-740e-af4d-9071-9aa0d9c10f04@gmail.com> <87efc8qnwh.fsf@portable.galex-713.eu> <87wopxr9p5.fsf@portable.galex-713.eu> <58828484-f9eb-bfda-803d-3b17623f85cd@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541081379 20147 195.159.176.226 (1 Nov 2018 14:09:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2018 14:09:39 +0000 (UTC) User-Agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 01 15:09:35 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIDfC-00059Z-RH for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2018 15:09:34 +0100 Original-Received: from localhost ([::1]:42279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIDhJ-0007nq-7v for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2018 10:11:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIDgo-0007X9-9L for emacs-devel@gnu.org; Thu, 01 Nov 2018 10:11:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIDgn-0005Zf-HM for emacs-devel@gnu.org; Thu, 01 Nov 2018 10:11:14 -0400 Original-Received: from portable.galex-713.eu ([2a00:5884:8305::1]:46854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gIDgn-0005ZI-9O for emacs-devel@gnu.org; Thu, 01 Nov 2018 10:11:13 -0400 Original-Received: from localhost ([::1] helo=portable.galex-713.eu) by portable.galex-713.eu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIDgl-0006Tr-6t; Thu, 01 Nov 2018 15:11:11 +0100 PGP-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F Accept-Language: fr, en, eo, it, br In-Reply-To: <58828484-f9eb-bfda-803d-3b17623f85cd@gmail.com> (=?utf-8?Q?=22Cl=C3=A9ment?= Pit-Claudel"'s message of "Thu, 1 Nov 2018 09:22:36 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:5884:8305::1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:230945 Archived-At: On 2018-11-01 at 09:22, Cl=C3=A9ment Pit-Claudel wrote: > On 31/10/2018 19.13, Garreau, Alexandre wrote: >> In lisp I would have prefered to be able to directly quote each symbol, >> and have this to work, eg: =E2=80=9C(pcase (list 1 2 3) (('a 'b 'c) t))= =E2=80=9D to >> return nil, and =E2=80=9C(pcase (list 'a 'b 'c) (('a 'b 'c) t))=E2=80=9D= to return t >> (and this is like many other lisp pattern-matching implementations >> already work). In current pcase, pattern =E2=80=9C(a b c)=E2=80=9D does= *not* mean >> =E2=80=9Cwith symbols 'a, 'b and 'c=E2=80=9D. > > But remember that this breaks the pattern-body symmetry:=20=20 > (pcase (list 'a 'b 'c) (('a 'b 'c) ('a 'b 'c))) > would match, but the body would raise an error. Then if it=E2=80=99s important to you, don=E2=80=99t do that, it=E2=80=99s = a question of tastes and style. Other implementations allow to do that. You may as well quote the list, or, better imho, use a list constructor (list 'a 'b 'c) as a pattern. Which also exists in other implementations.