>>> foo(["a", "b", "c"] as String...) 
>> 
>> I like this
> 
> +1

I really don't get this:
We have methods like NSLayoutConstraint.activate(_ constraints: 
[NSLayoutConstraint]), which works with an array, declares its parameter to be 
array and is called with an array. Quite simple.

On the other hand, we have functions which work with an array, but are declared 
with Type…, and are called with a comma-separated list of elements — and we 
should add an option to call this function (which works on array!) with an 
array that is decorated with a strange cast?
That looks extremely awkward to me.

Can I declare a variable like
var list: String… = "a"
?
Imho it's better to get rid of these odd types completely.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to