[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.
- Re: Replace trivial pcase occurrences in the Emacs sources,
Eli Zaretskii <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/11/01
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/11/01
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/11/01
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/11/01
- Re: Replace trivial pcase occurrences in the Emacs sources, TEIRLLM, 2018/11/01
- Re: Replace trivial pcase occurrences in the Emacs sources, Richard Stallman, 2018/11/02
- Re: Replace trivial pcase occurrences in the Emacs sources, Nix, 2018/11/04
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/11/04
- Re: Replace trivial pcase occurrences in the Emacs sources, TEIRLLM, 2018/11/01