The Expressiveness of D

Simen kjaeraas simen.kjaras at gmail.com
Tue Nov 2 06:46:16 PDT 2010


]Gary Whatmore <no at spam.sp> wrote:

> The D way of returning tuples is:
>
>   T!(int,int) ret;
>   auto f = (ref T!(int,int) r){ r = e; };
>   f(ret);

D also has better tuples in std.typecons.

auto t1 = tuple( 1,2 );
auto t2 = { return t1; }

-- 
Simen


More information about the Digitalmars-d mailing list