DIP32: Uniform tuple syntax
timotheecour
timothee.cour2 at gmail.com
Fri Apr 5 13:53:03 PDT 2013
On Saturday, 30 March 2013 at 18:05:27 UTC, bearophile wrote:
> Zach the Mystic:
>
>>> {c, $_} = tup;
>>> {c, @} = tup;
>>> {c, @_} = tup;
>>> {c, $$} = tup;
>>> {c, {}} = tup;
>>> {c, {_}} = tup;
>>> {c, $~} = tup;
>>> {c, @~= tup;
>>> etc.
>>
>> {c, ?} = tup;
>
> Right, I was forgetting that.
> Or this if you want to keep the single "?" for hypothetical
> future nullable types:
>
> {c, ?_} = tup;
What about
----
{c, void} = tup;
----
(proposed by Hara Kenji in the original AutoTupleDeclaration
declaration pull request
https://github.com/D-Programming-Language/dmd/pull/341 )
(and, independently of the missing symbol choice)
----
{a,b,void...} = tup; //tup = {1,2,3,4,5};
----
More information about the Digitalmars-d
mailing list