On 12/29/13 3:09 AM, Dicebot wrote:
1)
Timon has raised the point that exact match between in naming between
built-in and library type will be confusing as they will actually differ
in behavior (http://forum.dlang.org/post/l99mke$q1o$1...@digitalmars.com).
Andrei has proposed `TemplateArgumentPack` as an alternative
(http://forum.dlang.org/post/l9b5cu$2rsj$2...@digitalmars.com) which I do
like a lot.

That will also imply naming of module `std.meta.pack` instead of
`std.meta.list`

I think a duo `TemplateArgumentList` (auto-expansion) and `TemplateArgumentPack` (no auto-expansion) in the same module is the ticket. It also makes for a wonderful opportunity to explain the distinction in the documentation and recommend idioms for each.

As an alternative, I propose signatures of existing templates as-is but
augment them all with overloads taking single `Pack` (and make it
requirement when introducing new ones). New multilist utilities added
are expected to use `Pack`s (I am still convinced that using nested
templates for that is ugly)

To use your own argument: why add all those overloads instead of requiring the user to use .expand with a TemplateArgumentPack (or assuming we go with my suggestion above, just use a TemplateArgumentList in the first place)?

3)
Point about omitting expanding library type still remains. I am still
looking for use case when those are really necessary (as a library type).

See above. I think several people argued that there are plenty of places where automatic expansion is the desired behavior.


Andrei

Reply via email to