[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Garreau\, Alexandre |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Thu, 01 Nov 2018 02:34:30 +0100 |
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 |
On 2018-10-31 at 13:48, Clément Pit-Claudel wrote:
> On 31/10/2018 12.13, Eli Zaretskii wrote:
>>> Cc: address@hidden
>>> From: Dmitry Gutov <address@hidden>
>>> 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:
>>> http://lists.gnu.org/archive/html/emacs-devel/2018-10/msg00590.html
>>
>> 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 “destructuring pattern” as a “structure pattern
that use placeholders”, a “structure pattern” as a “pattern only
matching a structure, whose subpatterns match its subelements”, and a
“placeholder” as a “match-everything symbol that binds what it match to
its name”?
- Re: Replace trivial pcase occurrences in the Emacs sources, (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Dmitry Gutov, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Dmitry Gutov, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources,
Garreau\, Alexandre <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/29
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30