[Pitch] Parameter Packs

We could always introduce a language model into name lookup so that Widgets... would implicitly introduce the Widget name as well, and Indices... would properly singularize to Index. :slight_smile:

Yeah, I was thinking about something similar in an early variadic generics thread, though only as a tool for writing constraints:

I'm not totally sold either.

Yep, this is my feeling as well, and I wouldn't be opposed the type of regime you're proposing where we have a shorthand syntax for the simplest case and then fall back to a heavier syntax as soon as you want to do anything more complex. I think I'd still prefer something that makes it clear in elements... that we're working with a pack rather than a range bound, but at least it doesn't have the issue of the pack reference being buried deep inside a complex expression.

I feel like we can only really resolve this with one of two things:

  • Explicit pack syntax to make it visually obvious when you're referring to the full pack
  • Explicit destructuring syntax that allows you to introduce a singular name

As you (and John) noted in your previous post(s), there's a fundamental conflict between different usages of a pack that make a single choice for singular or plural look silly in some contexts.