emacs-devel
[Top][All Lists]
Advanced

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

Re: Replace trivial pcase occurrences in the Emacs sources


From: Clément Pit-Claudel
Subject: Re: Replace trivial pcase occurrences in the Emacs sources
Date: Wed, 31 Oct 2018 14:28:45 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 31/10/2018 14.11, Eli Zaretskii wrote:
>> From: Clément Pit-Claudel <address@hidden>
>> Date: Wed, 31 Oct 2018 13:48:42 -0400
>>
>>>> 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").
> 
> I actually think you meant "slots", not "holes".

No, I meant holes :) I've seen that term used both with patterns (see e.g. 
http://people.cs.uchicago.edu/~blume/classes/aut2008/proglang/handouts/lec-sml.pdf)
 and contexts (http://homepages.inf.ed.ac.uk/slindley/papers/many-holes.pdf).

>> Regarding the term "destructuring pattern": I think it's perfect.
> 
> But the pattern is not the one that destructures.  So I think
> "pattern-based destructuring" or "destructuring using patterns" would
> be better.  Or something like that.  I'm still looking for an
> appropriate term.

I think I don't understand what kind of term you're looking for, then :/
A "destructuring pattern" is a thing; "destructuring using patterns" is an 
action.

Sorry for the noise if I'm misunderstanding something.
Clément




reply via email to

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