Tuple literal syntax

Don nospam at nospam.com
Thu Oct 7 00:58:14 PDT 2010


Juanjo Alvarez wrote:
> On Wed, 06 Oct 2010 23:04:35 -0700, Walter Bright 
> <newshound2 at digitalmars.com> wrote:
>> (a,0)[0]
> 
> 
> 
> 
>> as how a user could generate a tuple of 1. Awkward, sure, but like 
> I said, I
>> think this would be rare.
> 
> Python uses:
> 
> (5,)
> Which is a lot better IMHO

I agree, that would fit well with the optional trailing commas in array 
literals.


More information about the Digitalmars-d mailing list