[swift-evolution] [pitch] Variadic Arguments should accept Arrays
Tino Heth
2th at gmx.de
Sat Mar 11 10:19:41 CST 2017
> I'd find it fantastic if they added
>
> var list: String... = 1, 2,3,4,5
If this list taught me anything, that it is that there is an incredible diversity what people like or dislike ;-)
But would you really prefer that (wait a moment: String??? ;-) over
var list: [Int] = 1, 2, 3
or boring old
var list = [1, 2, 3]
?
> However if they remove Variadic arguments then apple would need to remove it from their apis. To name a few...
>
> print
> NSPredicate(format:)
> UIAlertView
I have to point out that the proposal never aimed to remove variadic call — it has even been suggested to allow them for any array (or other types that can be constructed from an array literal).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170311/caf4a15e/attachment.html>
More information about the swift-evolution
mailing list