Wait, what? What is AliasSeq? - `Pack` Proposal
Mike via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 16 00:30:17 PDT 2015
On Thursday, 16 July 2015 at 05:51:01 UTC, Mike wrote:
>> C++ also have related use of the word "pack":
>>
>> http://en.cppreference.com/w/cpp/language/parameter_pack
>
> I propose simply "Pack".
>
I know Ola is making light of this situation and many of you find
this discussion beneath you, but we need a name, and with the
release looming we need it relatively soon.
I've creating a pull request for "Pack"
(https://github.com/D-Programming-Language/phobos/pull/3494)
which is inspired by C++'s parameter_pack as linked in the
previous post.
From the description:
"A template parameter pack is a template parameter that accepts
zero or more template arguments (non-types, types, or templates).
A function parameter pack is a function parameter that accepts
zero or more function arguments.
A template with at least one parameter pack is called a variadic
template."
Given that that D has its roots in C++ and this construct is
similar to the one in question, it seems like a good fit.
I prefer `Pack` over `AliasPack` or other variations because it's
more general and allows us to be more specific in the future with
`TypePack`, `ExpressionPack`, `AliasPack`, etc... later, but I'll
be happy to change it if that's what you all wish.
Ultimately, though, it's going to be a judgment call, and I hope
having a pull request ready to go makes things easier on those
who have to make the call. If it doesn't work, you know where
the close button is.
Mike
More information about the Digitalmars-d
mailing list