DIP19: Remove comma operator from D and provision better syntactic support for tuples
deadalnix
deadalnix at gmail.com
Sun Sep 23 17:07:01 PDT 2012
Le 24/09/2012 01:23, Timon Gehr a écrit :
> I assume named tuple fields are not a problem?
I'm not sure it is really usefull.
> Other than that, I raised the issue of how to match and destructure
> tuple types in template parameter lists. And came up with the following
> proposal, which I do not like.
>
> template Foo((U...,)){ alias (U,) Foo; }
>
> void main(){
> (int, double) x;
> Foo!(typeof(x)) y;
> static assert(is(typeof(x)==typeof(y)));
> }
>
The template syntax seems weird. Why do you want Foo((U...,)) when
Foo(U) could do it ?
More information about the Digitalmars-d
mailing list