[swift-evolution] [Proposal] Automating Partial Application via Wildcards
Chris Lattner
clattner at apple.com
Tue Feb 2 12:15:33 CST 2016
> On Feb 2, 2016, at 9:33 AM, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>
> When called with wildcard tokens, the function is partially applied using the supplied arguments. For example:
>
> let partial1 = projectFunctionToCoordinateSystem(function: mySinFunction, p0: p0, p1: p1, x: _)
> // partial1(x: xValue)
One superficial comment on this: the use of _ here is a bad idea. _ already means something in expressions - “discard”, and a closely related thing in declarations - “ignore”.
Adding a third very different thing (placeholder to be filled in later) seems like a really confusing thing to do.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160202/4724ff36/attachment.html>
More information about the swift-evolution
mailing list