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:40:23 +0100 Message-ID: <87tvl1poc8.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> <83efc7jjm2.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 1541036360 21877 195.159.176.226 (1 Nov 2018 01:39:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2018 01:39:20 +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: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 01 02:39:16 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 1gI1x6-0005ba-5c for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2018 02:39:16 +0100 Original-Received: from localhost ([::1]:34369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gI1zC-0005lj-89 for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2018 21:41:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gI1yV-0005lc-82 for emacs-devel@gnu.org; Wed, 31 Oct 2018 21:40:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gI1yU-0001ed-9h for emacs-devel@gnu.org; Wed, 31 Oct 2018 21:40:43 -0400 Original-Received: from portable.galex-713.eu ([2a00:5884:8305::1]:46304) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gI1yT-0000xS-QA; Wed, 31 Oct 2018 21:40:42 -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 1gI1yC-0004US-0y; Thu, 01 Nov 2018 02:40:25 +0100 PGP-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F Accept-Language: fr, en, eo, it, br In-Reply-To: <83efc7jjm2.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 Oct 2018 21:54:29 +0200") 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:230935 Archived-At: On 2018-10-30 at 21:54, Eli Zaretskii wrote: > No, I think "destructuring" is about right. How about this text: > > @dfn{Destructuring} of an object is an operation that extracts > multiple values stored in the object, e.g., the 2nd and the 3rd > element of a list or a vector. @dfn{Destructuring binding} is > similar to a local binding (@pxref{Local Variables}), but it gives > values to multiple elements of a variable by extracting those values > from an object of compatible structure. =E2=80=9C(car list)=E2=80=9D is extracting a value stored in an object, yet= it=E2=80=99s not destructuring (though a list is a structure). Nor even is =E2=80=9C(cons (= car list) (caddr list))=E2=80=9D or =E2=80=9C(setq a (nth 1 list) b (nth 2 list= ))=E2=80=9D. I=E2=80=99d say destructuring, like in python (so to stop referring ocaml) = =E2=80=9Ca,b =3D 2,3=E2=80=9D, implies a =E2=80=9Cspecification reflecting the structure= =E2=80=9D, so =E2=80=9Ca,b=E2=80=9D *has* to be a pair/two-elements array/list/whatever. So how about: @dfn{Destructuring} of an object is an operation that extracts multiple values stored in the object, by speciying a structure reflecting it, e.g., the 2nd and the 3rd element of a 3-elements list or a vector.