Another attempt at passing arrays as varargs (with implementation)

The core team discussed this pitch today. We think it is solving an important problem, but doesn’t sufficiently account for future design directions, such as variadic generics, which should—when introduced—work like it’s part of the same feature. The proposed syntax is specific to homogeneous collections (so wouldn’t apply to generic argument packs) and needlessly so: the compiler doesn’t need the element type to be restated just so it can explode the array. We’re not necessarily opposed to adding array explosion problem before full variadic generics are introduced, but how the designs work together, and some evidence that we’re not painting ourselves into a corner that precludes a desired future, should be part of any proposal

Thanks all

15 Likes