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

deadalnix deadalnix at gmail.com
Fri Sep 28 10:08:57 PDT 2012


Le 27/09/2012 00:38, bearophile a écrit :
> Jonathan M Davis:
>
>> It sounds to me like the reason that structural typing is needed is
>> because
>> Tuple allows you to name its fields, which I've always thought was a
>> bad idea,
>
> 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.
>

What is the benefit over a struct ?


More information about the Digitalmars-d mailing list