[Pitch] Parameter Packs

Well, parameter packs are one concept that extend to both type parameter packs and value parameter packs, so we need to have a common term to explain the operations that you can do at the type level and at the value level :slightly_smiling_face:

I agree that there's probably a better spelling out there, and I am definitely open to suggestions. I also think that "length" might be the wrong concept to be thinking about, because packs will also have varying degrees of abstract structure depending on the requirements placed on them. Some level of statically known structure might also be useful for destructuring packs, which is mentioned in the future directions. I wonder if the concept in the programming model should be "pack structure" or "pack shape" instead of "pack length" (where same-structure also implies same-length).

I worry that # signals "known by the compiler", when the length is still only known at runtime. if #available is similar, and many folks confuse #available with a compile-time constant.

Tuple conformances will need parameters packs and some of the other future directions in order to express. Modeling packs as tuples was already explored and ruled out due to the fundamental ambiguities between using a tuple as a component parameter and using a tuple as the pack itself, among other disadvantages outlined in the alternatives considered.

2 Likes