A Discussion of Tuple Syntax

ixid nuaccount at gmail.com
Mon Aug 19 16:23:39 PDT 2013


On Monday, 19 August 2013 at 22:36:34 UTC, bearophile wrote:
> ixid:
>
>> auto assoc_array = [1 : (2 : 3)]; // A tuple associative value
>> auto assoc_array2 = [(1 : 2) : 3]; // A tuple associative key
>>
>> auto ternary = value? (1 : 2) : (3 : 4); // tuple values in a 
>> ternary operator
>>
>> It's nicer looking than #().
>
> Are singleton tuples represented with (1:) ?
>
> Bye,
> bearophile

Sure, why not? It looks happy enough. :) Are singleton tuples 
actually useful for anything?


More information about the Digitalmars-d mailing list