Re: PackedAliasSeq?

2018-02-26 Thread Simen Kjærås via Digitalmars-d
On Thursday, 22 February 2018 at 19:26:54 UTC, Andrei Alexandrescu wrote: template PackedAliasSeq!(T...) { alias expand = AliasSeq!T; } I started playing around with this a few days ago, and came up with another interesting abstraction - NamedPack: alias foo = NamedPack!("Type&

Re: PackedAliasSeq?

2018-02-24 Thread John Colvin via Digitalmars-d
U[1], Merge!T.With!(U[2 .. $])); } } So instead of the unworkable Merge!(AliasSeq!(...), AliasSeq!(...)), one would write Merge!(AliasSeq!(...)).With!(AliasSeq!(...)). The problem remains for other use cases, so I was thinking of adding to std.meta this simple artifact: template PackedAliasSeq!(

Re: PackedAliasSeq?

2018-02-24 Thread Petar via Digitalmars-d
to std.meta this simple artifact: template PackedAliasSeq!(T...) { alias expand = AliasSeq!T; } That way, everything stays together and can be expanded on demand. Andrei Isn't a packed AliasSeq just a tuple ? It is not a tuple (in the `std.typecons.Tuple` sense) if it can contain value

Re: PackedAliasSeq?

2018-02-23 Thread deadalnix via Digitalmars-d
U[1], Merge!T.With!(U[2 .. $])); } } So instead of the unworkable Merge!(AliasSeq!(...), AliasSeq!(...)), one would write Merge!(AliasSeq!(...)).With!(AliasSeq!(...)). The problem remains for other use cases, so I was thinking of adding to std.meta this simple artifact: template PackedAliasSeq!(

Re: PackedAliasSeq?

2018-02-22 Thread Seb via Digitalmars-d
On Thursday, 22 February 2018 at 19:26:54 UTC, Andrei Alexandrescu wrote: After coding https://github.com/dlang/phobos/pull/6192 with AliasSeq, the experience has been quite pleasurable. However, in places the AliasSeq tends to expand too eagerly, leading to a need to "keep it together" e.g.

PackedAliasSeq?

2018-02-22 Thread Andrei Alexandrescu via Digitalmars-d
.), AliasSeq!(...)), one would write Merge!(AliasSeq!(...)).With!(AliasSeq!(...)). The problem remains for other use cases, so I was thinking of adding to std.meta this simple artifact: template PackedAliasSeq!(T...) { alias expand = AliasSeq!T; } That way, everything stays together and c