[swift-evolution] array splatting for variadic parameters

Anton Zhilin antonyzhilin at gmail.com
Tue Feb 14 14:43:42 CST 2017


2017-02-14 18:32 GMT+03:00 Dimitri Racordon via swift-evolution <
swift-evolution at swift.org>:

The proposal is indeed really interesting.
> I would love to see if it could get a second round of discussion.
>
> However, I failed to understand the syntax of the proposed extension.
> Where would be defined the label and parameter names? Is this just a typo?
>
> func someFunc<I:IteratorProtocol where I.Element == Int)
>
> “Obviously”, the Collection variant should look like:

func someFunc<C: Collection where C.Iterator.Element == Int>(_ values:
@variadic C) { … }

And the others are analagous.
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170214/1a4ea0d7/attachment.html>


More information about the swift-evolution mailing list