A Discussion of Tuple Syntax

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Aug 19 11:39:32 PDT 2013


On Mon, Aug 19, 2013 at 08:10:38PM +0200, Dicebot wrote:
> On Monday, 19 August 2013 at 17:57:45 UTC, Meta wrote:
> >As far as I can tell, when everyone talks about tuple syntax, they
> >are talking about run-time tuples. That's definitely what I'm
> >talking about whenever I mention tuple syntax, as I don't think it
> >would be a good thing to use it for both run-time and compile-time
> >tuples (and I don't really consider the latter tuples).
> 
> No. I speak exclusively about native syntax for compile-time tuples
> and stand by the point that run-time tuples are mostly fine as-is
> and should not be touched at all.

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.

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.

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

-- 
Let's not fight disease by killing the patient. -- Sean 'Shaleh' Perry


More information about the Digitalmars-d mailing list