> The second case would looks really strange without the variadic parameter 
> (calling site) syntax and it would no longer look like it’s one continuous 
> list of values.
agreed, that would be odd — but I really hope that there will be a nice 
alternative in the future.

One very fundamental thing is missing in Swift: Fixed-size arrays.

I can't predict if or how this issue will be tackled, but the most elegant way 
I can see would be generic values:
let array: Array<size: 5, Int>
If this happens, it should be possible to create arrays with a minimal size as 
well — and additionally, you could impose other restrictions (max length, even 
number of elements, length mod x = n…).

I repeat that this is all speculation, and it might never happen… but would you 
be fine with this alternative?
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to