C#7 features

Jacob Carlborg via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon May 9 06:09:24 PDT 2016


On 2016-05-09 14:46, John wrote:

> C# 7's tuples are something different though. They don't even map to
> System.Tuple. The syntax is:
>
>    (int x, int y) GetPoint() {
>      return (500, 400);
>    }
>
>    var p = GetPoint();
>    Console.WriteLine($"{p.x}, {p.y}");

Would be nice to have in D. Both with and without named fields.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list