[Pitch] Parameter Packs

This is understandable, but somewhat unfortunate if I understand correctly then that the function type of such a function declaration becomes unutterable.

I wonder if the alternative has been explored where such function types are actually utterable but such functions, in the absence of a label, are uncallable for ambiguity (similar, perhaps in a tenuous way, to how the language doesn't forbid ambiguous overloads but errors at the call site).

This wouldn't make the issue go away entirely but
(a) may unblock certain uses—a user may wish to call a function declared func frobnicate<T, U..., V...>(_: T, zipping: U..., and: V...) -> Int to frobnicate only a single argument without zipping, and it's not strictly necessary to forbid calling a variable of the same function type with a single argument; and
(b) it would make the design more future-proof if the long-ago core team plan-of-record to allow compound names with argument labels for variables of function type comes to fruition.

3 Likes