Variadic parameters passing

Given this, it sounds like the syntax the core team wants for splatting is:

func foo<T>(_ arg: T...) {
    print(repeat each arg)
}

Which isn't that bad, and I can't think of any reason it won't work. It's basically just an overload of repeat each that takes an array instead of a pack parameter.

The implementation in the pitch has probably bit-rotted though.

2 Likes