DIP54 : revamp of Phobos tuple types

Dicebot public at dicebot.lv
Mon Dec 23 03:17:02 PST 2013


On Monday, 23 December 2013 at 11:08:26 UTC, Andrej Mitrovic
wrote:
> If you simply remove the auto-expanding TypeTuple you will force
> coders to reinvent it. This may not seem like a big deal since 
> you can
> simply do "alias List(T..) = T;", but it's a convenience 
> template that
> should stay in Phobos.

This is not really true. Any instance of `TypeTuple!(a, b, c)`
can be replaced with `TemplateArgumentList!(a, b, c).expand` with
no additional changes or definition of custom wrappers. Such
shortcut other way around is not possible - this is exactly why
having single non-expanding entity can work.

It does make you type more in metaprogramming code but this is
relatively small inconvenience that is faster to make than to
argue about. Before writing this DIP I have tested it on some of
my own template-heavy code to get an impression how it may look
like.


More information about the Digitalmars-d mailing list