[swift-evolution] Proposal: Pattern Matching Partial Function
Charles Constant
charles at charlesism.com
Mon Jan 18 18:42:16 CST 2016
No worries, Craig! The name is really not a big deal.
Thanks to you and Paul for your work on the proposal. I'm really hoping the
Swift team accepts it.
On Mon, Jan 18, 2016 at 3:13 PM, Craig Cruden <ccruden at novafore.com> wrote:
> It is sitting in the proposal queue - not sure about renaming… but even if
> I don’t think the proposed name is better.
>
> The primary part of it is allowing pattern matching within closures (a
> related to anonymous function - but I don’t generally here reference to
> partial closures) which encompasses several scenarios. i.e. a specialized
> (not general) implementation of a partial function.
>
> The map on values is a special case to allow this closure to map a single
> value.
>
> If we rename it then the question becomes why are we introducing case
> statements in an closure - isn’t that were a function block goes?
>
>
>
> On 2016-01-19, at 6:05:33, Charles Constant <charles at charlesism.com>
> wrote:
>
> Is it too late to rename the proposal? I will never be able to remember it
> :(
>
> Maybe "Singular Map/Filter/Reduce" or "Item M/F/R"?
>
> Apologies if we already discussed this earlier. Thread is pretty long now,
> I may have missed it
>
> On Mon, Jan 18, 2016 at 2:53 PM, Craig Cruden <ccruden at novafore.com>
> wrote:
>
>> I have renamed the document - new link is
>>
>>
>> https://github.com/cacruden/swift-evolution/blob/master/proposals/0023-Pattern-Matching-Partial-Function.md
>>
>> I have initiated a pull request…. I think the proposal is sufficient to
>> get to the review stage (which is a week)… so the haggling on the small
>> stuff will likely happen again at that time anyway.
>>
>> Of course my views may be corrupted by being too close to the proposal :p
>>
>>
>> On 2016-01-18, at 3:04:35, Charles Constant <charles at charlesism.com>
>> wrote:
>>
>> I think examples are convincing, but ideally we would put most of them in
>> separate document.
>>
>> Though I love reading about programming, I generally do it in a
>> half-assed sort of way. Unless the writing is very blunt and clear, I don't
>> really understand it until I need to do it myself. I doubt I'm the only
>> person here like this.
>>
>> I badly want this proposal to gain traction (more so every time I find
>> myself writing code that it could improve, which happens daily). I think
>> the proposal ought to be short and sweet. I believe if we hold the reader's
>> attention just long enough for them to understand what we're talking about,
>> they'll be onboard. Once they're hooked, we have our second document with
>> the list of examples.
>>
>> It would also be great to have the "before snippet" and "after snippet"
>> visually arranged side-by-side. I'm guessing markdown doesn't support this
>> :(
>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160118/c717cb43/attachment.html>
More information about the swift-evolution
mailing list