On Wednesday, 8 July 2015 at 18:01:36 UTC, Steven Schveighoffer
wrote:
On 7/8/15 1:44 PM, Timon Gehr wrote:
On 07/08/2015 11:38 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?=
<schue...@gmx.net>" wrote:
I like "AliasTuple" as suggested by Martin, although it isn't
a perfect
fit either when you think of `alias` template params, which
don't match
`int`, while `int` can be an element of a TypeTuple.
But this works: alias Int = int;
The right fix for this issue is to fix the language. This does
not make
any sense.
Yes, Walter at dconf also (I think) agreed this at least needs
to be fixed:
alias Int = int;
template T(alias X) { enum a = 1;}
int x = T!Int.a; // error
In addition, this doesn't work:
alias foo = 2;
But this does:
int x = T!2.a;
I think alias should be the same anywhere you use it. And
Alias<insert term here> for a name for what
TypeTuple/Arguments/AliasSeq is, seems like an appropriate name
given how template aliases work. Not my favorite, but it's at
least based in logic.
-Steve
Yes, yes, yes, 20 times yes. There are some quirks with what can
be aliased depending on how the alias is declared, this needs to
be unified.
The thing we are naming here is some collection of aliases.
Talking to everybody, the 2 names that came up frequently for
this collection are List and Sequence. I personally don't mind,
but Walter had strong views against List, so I went for Sequence.
Now we should decide for a term for this entity we have in D that
is kind of tuple but auto unpack. This construct does not exists
in other languages, so, as explained by Jonathan, no existing
name will fit 100% . I'd say we pick some name that evoke an
ordered collection and that which is not already used for some
existing construct in D (which rules out array for instance) or
have a well defined meaning (like tuple).
Sequence fit the bill. I don't mind using another name that fit
the bill as well. Nobody came up with that name yet.