uniform tuple syntax

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 24 20:00:28 PDT 2015


On 25/03/2015 7:11 a.m., Martin Nowak wrote:
> On 03/24/2015 03:11 PM, Vlad Levenfeld wrote:
>> Anything going on with this? Been looking forward to seeing it for awhile.
>
> I think we should settle on a syntax and split DIP32 in a tuple part and
> a pattern matching part.
> The proposal wasn't yet formally accepted, partly because we wanted to
> wait, whether more needs come up. By now it's already 2 years old and it
> still looks complete IMO.
>
> http://wiki.dlang.org/DIP32

There is one thing blatantly missing atleast to me.
Unpacking into function arguments.

void myfunc(int x, string y) {
	// ...
}

myfunc({1, "hi!"}.unpack);

Lua has something along these lines for tables. And it is a real hit. Of 
course .unpack probably isn't needed, but hey it makes it more explicit.


More information about the Digitalmars-d mailing list