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 06:21:49 +0100 Message-ID: <87a7mtnziq.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> <87tvl1poc8.fsf@portable.galex-713.eu> <83zhuth1z7.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 1541049625 26292 195.159.176.226 (1 Nov 2018 05:20:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2018 05:20:25 +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: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 01 06:20:20 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 1gI5P1-0006jV-SI for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2018 06:20:19 +0100 Original-Received: from localhost ([::1]:35299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gI5R8-00015c-5p for ged-emacs-devel@m.gmane.org; Thu, 01 Nov 2018 01:22:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gI5Qa-0000r9-Bd for emacs-devel@gnu.org; Thu, 01 Nov 2018 01:21:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gI5QZ-0004Tz-HA for emacs-devel@gnu.org; Thu, 01 Nov 2018 01:21:56 -0400 Original-Received: from portable.galex-713.eu ([2a00:5884:8305::1]:46572) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gI5QZ-0004RI-5Z; Thu, 01 Nov 2018 01:21:55 -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 1gI5QT-0005C3-Ti; Thu, 01 Nov 2018 06:21:50 +0100 PGP-FINGERPRINT: E109 9988 4197 D7CB B0BC 5C23 8DEB 24BA 867D 3F7F Accept-Language: fr, en, eo, it, br In-Reply-To: <83zhuth1z7.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 01 Nov 2018 06:10:36 +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:230939 Archived-At: On 2018/11/01 at 06:10, Eli Zaretskii wrote: >> From: "Garreau\, Alexandre" >> Cc: Stefan Monnier , emacs-devel@gnu.org >> Date: Thu, 01 Nov 2018 02:40:23 +0100 >>=20 >> 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. >>=20 >> =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(con= s (car >> list) (caddr list))=E2=80=9D or =E2=80=9C(setq a (nth 1 list) b (nth 2 l= ist))=E2=80=9D. > > You forget the "multiple" part in the description. Then you forgot =E2=80=9C(cons (car list) (caddr list))=E2=80=9D which I pr= oposed later. > "Destructuring" is not a term that Emacs invented. Yes, learnt it reading stuff about python and ocaml, afair. > You can look it up on the Internet; I think you will find that the > adopted definitions are similar to what I wrote. Yes, and these are wrong. > So we don't need to try too hard in this case, as someone else already > did that for us. Not =E2=80=9Ctoo hard=E2=80=9D, nor =E2=80=9Chard=E2=80=9D at all, nor even= correctly. Or then, any reference (hence extraction) to something inside a structure, when done several time, is destructuring, and as this ought to be possible if structures exist, any language with structures / compound data, does destructuring all the time. But when talking about destructuring such as in cl-destructuring-bind, pcase, python/ml/js multiple-assignments, this is different. Wasn=E2=80=99t my definition attempt okay? it even defined three quite used= and intuitive terms.