DIP19: Remove comma operator from D and provision better syntactic support for tuples

deadalnix deadalnix at gmail.com
Fri Sep 28 10:09:37 PDT 2012


Le 27/09/2012 08:17, Jacob Carlborg a écrit :
> On 2012-09-27 00:38, bearophile wrote:
>
>> I have appreciated named fields of D tuples since the beginning, I have
>> found them quite handy. With them sometimes you don't need to unpack a
>> tuple, you can just access its fields with a nice name, avoiding to move
>> around more than one variable.
>
> If you could do something like this:
>
> auto x, y = tuple(1, 2);
>
> Wouldn't that be an acceptable solution instead?
>

It is ambiguous with the comma declaration syntax.


More information about the Digitalmars-d mailing list