What is the stance on partial initializers when declaring

Jacob Carlborg doob at me.com
Fri Jul 22 00:00:39 PDT 2011


On 2011-07-22 03:29, Simen Kjaeraas wrote:
> I agree that a shorter syntax for 2-tuples could be beneficial, and
> certainly may make more people use it (also, the -> arrow is not
> taken yet):
>
> auto foo = AA([
> "a" -> 1,
> "b" -> 19,
> "c" -> -3,
> ]);

Now that is a syntax I would like to see in D. This would be even better:

auto foo = "a" -> 1, "b" -> 19, "c" -> -3;

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list