[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace trivial pcase occurrences in the Emacs sources

From: Eli Zaretskii
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Thu, 01 Nov 2018 06:10:36 +0200

> From: "Garreau\, Alexandre" <address@hidden>
> Cc: Stefan Monnier <address@hidden>,  address@hidden
> Date: Thu, 01 Nov 2018 02:40:23 +0100
> 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.
> “(car list)” is extracting a value stored in an object, yet it’s not
> destructuring (though a list is a structure).  Nor even is “(cons (car
> list) (caddr list))” or “(setq a (nth 1 list) b (nth 2 list))”.

You forget the "multiple" part in the description.

"Destructuring" is not a term that Emacs invented.  You can look it up
on the Internet; I think you will find that the adopted definitions
are similar to what I wrote.  So we don't need to try too hard in this
case, as someone else already did that for us.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]