s/type tuple/template pack/g please

Jakob Ovrum jakobovrum at gmail.com
Thu Aug 22 06:39:23 PDT 2013


On Wednesday, 21 August 2013 at 17:53:21 UTC, Andrei Alexandrescu 
wrote:
> There's an inordinate amount of confusion around what we 
> currently call "type tuple" (embodied in std's TypeTuple). I've 
> been furious immediately as I got word that Walter called it 
> that way, and it hasn't failed to make everybody else feel the 
> same over the years.
>
> So: shall we use "template pack" going forward exclusively 
> whenever we refer to that stuff? That way we can unambiguously 
> use "tuple" for "value tuples, i.e. like mini-structs that 
> group values together".

I'm fine with any name but would like to point out that it's 
probably essential that the new name allows for the distinction 
between what we currently call type tuples and expression/mixed 
tuples. The latter are not so important to distinguish, but type 
tuples have the privilege of being able to declare an expression 
tuple:

     TypeTuple!(int, string) myExpressionTuple;
     myExpressionTuple[0] = 42;
     myExpressionTuple[1] = "foo";
     // etc

If we don't have an easy way to refer to this distinction with 
the new naming, it may not be adequate enough for everyone to 
discard the old, confusing names, which could potentially 
seriously stall adoption, as it would be tempting to use the old 
terms in certain situations. We also have the naming of 
std.traits' `isTypeTuple` and `isExpressionTuple` to think about.

On a different tangent; changes like this are probably easier to 
push through when they have a strong air of officialness. Thank 
you for starting the process with this thread. An idea would be 
to have Walter and/or yourself (Andrei) pick a short list of 
names you think make the most sense after the discussion has 
unfolded, then put them on a vote. If it ends in a tie, the two 
of you could exercise executive discretion in choosing the 
winner. The result could then be an official announcement that we 
could share in the community to further adoption.

> Destroy. I mean criticize.

Oh please, I think "destroy" reflects a healthy prevalence of 
openness to criticism in this community, let's not stop using it 
just because one or two newbies have announced some mild 
displeasure with it :P


More information about the Digitalmars-d mailing list