DIP19: Remove comma operator from D and provision better syntactic support for tuples
Dmitry Olshansky
dmitry.olsh at gmail.com
Wed Sep 26 05:21:38 PDT 2012
On 25-Sep-12 23:29, kenji hara wrote:
> My suggestion is very simple.
> 1. Change all words "built-in tuple" in the documentation to "built-in
> sequence". Then, in the D language world, we can have clarify name for
> the built-in one.
> 2. Introduce new templates, Seq, TypeSeq, and ExpSeq.
>
> template Seq(T...) { alias T Seq; } // identical with
> std.typetuple.TypeTuple
> template TypeSeq(T...) if (allSatisfy!(isType, T)) { alias T TypeSeq; }
> template ExpSeq(T...) if (allSatisfy!(isExpression, T)) { alias T ExpSeq; }
>
> If you really want to a sequence with heterogeneous elements, use
> Seq template. Otherwise use TypeSeq or ExpSeq based on your purpose.
>
vote++;
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list