DIP54 : revamp of Phobos tuple types

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Dec 30 07:46:13 PST 2013


On 12/30/13 12:39 AM, Dicebot wrote:
> On Monday, 30 December 2013 at 06:42:56 UTC, Andrei Alexandrescu wrote:
>>> If it is you judgement, let it be so. I prefer to start working on
>>> implementation whatever it is as opposed to endless discussion. What is
>>> your opinion about defining general guideline to use packs over nested
>>> templates for multi-list algorithms (another disagreement between me and
>>> Jakob)?
>>
>> I think an argument advocating a bunch of changes that add chaff to
>> code that works very well would have a hard time geting off the
>> ground. Use the right tool for the job - that's why we're providing
>> two of them.
>
> It is not related to any existing code as there are no multi-list
> templates in std.typetuple right now. What I am speaking about is
> defining new ones in two possible ways:
>
> template Equals(T1...)
> {
>      template To(T2...)
>      { ... }
> }
>
> vs
>
> template Equals(alias T1, alias T2)
>      if (isTemplateArgumentPack!T1 && isTemplateArgumentPack!T2)
> {
> }
>
> I think default Phobos style should be the latter while Jakob seems to
> favor the former. Judgement of uninterested party is welcome.

I think the latter style is more natural.

Andrei


More information about the Digitalmars-d mailing list