DIP32: Uniform tuple syntax

Jacob Carlborg doob at me.com
Fri Mar 29 08:49:54 PDT 2013


On 2013-03-29 13:49, Adam D. Ruppe wrote:
> My first thought when I saw {} was json. This is getting a little
> further away from tuples, but would it be hard to add named fields to
> this too like json:
>
> auto a = {"foo":12, "bar":"twelve"};
>
> int a_foo = a.foo;
> string a_bar = a[1];

I had a proposal of anonymous structs that is similar to this:

http://forum.dlang.org/thread/kfbnuc$1cro$1@digitalmars.com

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list