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

Jarod Long swift at lng.la
Wed Jan 27 13:32:08 CST 2016


But failure in this case is a function that takes two arguments, and failureStubs is an array of tuples that map to that function's arguments. How do the tuple values get mapped to the arguments if not via tuple splatting?

Jarod

> On Jan 27, 2016, at 11:28, Chris Lattner <clattner at apple.com> wrote:
> 
>> On Jan 27, 2016, at 11:24 AM, swift at lng.la <mailto:swift at lng.la> wrote:
>> 
>> Apologies -- I just realized I chose a bad example that isn't actually using the feature, but the usage would be here:
>> 
>> if successStubs.count > 0 {
>>     success(successStubs.removeFirst())
>> }
>> else if failureStubs.count > 0 {
>>     failure(failureStubs.removeFirst())
>> }
> 
> This isn’t using the feature either.  You are passing a single value (returned by removeFirst) as a single argument.  No spat is happening.
> 
> -Chris

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


More information about the swift-evolution mailing list