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: Replace trivial pcase occurrences in the Emacs sources Date: Thu, 01 Nov 2018 02:34:30 +0100 Message-ID: <87y3adpom1.fsf@portable.galex-713.eu> References: <83tvlcsnee.fsf@gnu.org> <86mur137n8.fsf@gmail.com> <20181029130132.GB4195@ACM> <20181029134722.GC4195@ACM> <87lg6gifnb.fsf@web.de> <87muqwxs7m.fsf@ericabrahamsen.net> <83h8h3jlyd.fsf@gnu.org> <8b897e43-679b-d38c-e185-0efe19c09342@yandex.ru> <83y3aei08p.fsf@gnu.org> <83o9bahz6i.fsf@gnu.org> 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 1541036002 29630 195.159.176.226 (1 Nov 2018 01:33:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2018 01:33:22 +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 02:33:18 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 1gI1rH-0007Xo-Iw for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2018 02:33:15 +0100 Original-Received: from localhost ([::1]:34343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gI1tN-0001ev-OE for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2018 21:35:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gI1sg-0001ed-A4 for emacs-devel@gnu.org; Wed, 31 Oct 2018 21:34:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gI1se-0005yA-4F for emacs-devel@gnu.org; Wed, 31 Oct 2018 21:34:42 -0400 Original-Received: from portable.galex-713.eu ([2a00:5884:8305::1]:46296) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gI1sc-0005qr-EG for emacs-devel@gnu.org; Wed, 31 Oct 2018 21:34:38 -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 1gI1sU-0004Sk-Ey; Thu, 01 Nov 2018 02:34:32 +0100 PGP-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F Accept-Language: fr, en, eo, it, br In-Reply-To: (=?utf-8?Q?=22Cl=C3=A9ment?= Pit-Claudel"'s message of "Wed, 31 Oct 2018 13:48:42 -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:230934 Archived-At: On 2018-10-31 at 13:48, Cl=C3=A9ment Pit-Claudel wrote: > On 31/10/2018 12.13, Eli Zaretskii wrote: >>> Cc: emacs-devel@gnu.org >>> From: Dmitry Gutov >>> Date: Wed, 31 Oct 2018 18:05:44 +0200 >>> >>>> Can someone enlighten me regarding those "holes"? What does that >>>> allude to? >>> >>> I stole the term from Clement here:=20 >>> http://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00590.html >>=20 >> Ah, the elements that are assigned by destructuring? I indeed hoped >> we could identify in some way the patterns which satisfy that >> condition. I didn't give up yet. > > Regarding the word "holes": I think these ","-prefixed symbols are > typically called "pattern-matching variables", or "placeholders". > "holes" is the more colloquial term, the idea being that if you "fill" > the "holes" in the pattern with the appropriate values, you get the > original data back (formally, you perform a "substitution" of the > "placeholders"). > > Regarding the term "destructuring pattern": I think it's perfect. The > only other decent alternative I can think of would be > "variable-binding pattern". So may we not define =E2=80=9Cdestructuring pattern=E2=80=9D as a =E2=80=9C= structure pattern that use placeholders=E2=80=9D, a =E2=80=9Cstructure pattern=E2=80=9D as a = =E2=80=9Cpattern only matching a structure, whose subpatterns match its subelements=E2=80=9D, and= a =E2=80=9Cplaceholder=E2=80=9D as a =E2=80=9Cmatch-everything symbol that bi= nds what it match to its name=E2=80=9D?