A Discussion of Tuple Syntax

Meta jared771 at gmail.com
Mon Aug 19 16:48:35 PDT 2013


On Monday, 19 August 2013 at 18:40:58 UTC, H. S. Teoh wrote:
> Case in point. :)
>
> So we're actually talking at cross purposes here. Bearophile & 
> Meta et
> al want native syntax for *runtime* tuples (i.e. 
> std.typecons.Tuple --
> sorry for the mixup with std.range in my earlier posts), but 
> you're
> talking about native syntax for alias tuples (aka TypeTuples). 
> Two
> completely different things.

Now that I reread Kenji's DIP for a third time, I see/recall that 
his intention was for this syntax to be for alias tuples. In that 
case, wouldn't this necessitate a change in semantics? Will these 
alias tuples using built-in syntax still auto-expand?

> I agree that we shouldn't be making built-in syntax for a 
> library type.
> If anything, any dedicated syntax should be reserved for alias 
> tuples
> (aka std.typetuple.Typetuple). Or, at the very least, rename 
> TypeTuple
> to AliasTuple.

I don't necessarily want built-in syntax for a library type, but 
making tuples first-class would be nice. I mean, it's a bummer 
that they can't be returned from functions. That should 
definitely be changed.

> Conflating these two concepts has led to endless confusion, 
> which is why
> I insisted on addressing this issue before we even begin to 
> talk about
> syntax. Otherwise we're going nowhere.
>
>
> T



More information about the Digitalmars-d mailing list