[swift-evolution] Proposal: Remove implicit tuple splat behavior from function applications

Chris Lattner clattner at apple.com
Wed Jan 27 12:53:38 CST 2016

> On Jan 27, 2016, at 10:46 AM, davesweeris at mac.com wrote:
> <scratches head> Then I’ve misunderstood what splatting was. Is the difference between splatting and what my example does the arguments’ labels?
> func f(a : Int, _ b : Int) {…}
> let x = FunctionApplicator((42, b: 19), f) //Would stay legal, because of the "b:"
> let y = FunctionApplicator((42, 19), f)    //Would become illegal, because there’s no “b:”

There is no change to either of these.  The later example succeed because of an implicit conversion from "(T,U) -> (T, b: U)”, which is an entirely separate thing.

The tuple splat behavior I’m talking about can *only* affect call sites that take a single argument.  Both of these examples take two.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160127/cd079928/attachment.html>

More information about the swift-evolution mailing list