DIP32: Uniform tuple syntax

Philip Stuckey via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 13 16:02:43 PDT 2014


On Friday, 29 March 2013 at 08:58:06 UTC, kenji hara wrote:
> http://wiki.dlang.org/DIP32
>
> Kenji Hara

I'm not sure if this is off topic or redundant but couldn't many 
of these things be added to the standard library without a 
special syntax. for instance s function like unpack could allow

     import std.typecons;
     int a;
     char b ;
     unpack(a,b) = tuple(5, 'A');
     assert(a==5 && b=='A');

instead 0f

     (int a, char b) = (5,'A');

or whatever.

Would this help the problem?


More information about the Digitalmars-d mailing list