On 7/9/15 4:54 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schue...@gmx.net>" wrote:
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.

Of course, but I thought that was out of question. However...


Yes, Walter at dconf also (I think) agreed this at least needs to be
fixed:

.... that's nice to hear!

After the last talk (I think) David Nadlinger went around with a hand-written piece of code that did something similar to what I wrote and asked everyone whether it should compile or not. Both Walter and I said it should (I thought alias works as long as you are passing a *symbol* and not a keyword, and Int is a symbol). But it doesn't because T!(Int) and T!(int) are considered the same template instantiation.

Only I think 2 people correctly realized it was currently invalid. Taking a look through phobos, you will see all kinds of duplicate templates, one that is SomeTemplate(alias T) and one that is SomeTemplate(T) (which do the same thing), just for this limitation. I think it's a huge waste of code space and mental confusion.

Then I think we should definitely go with "AliasTuple".

Yeah, I have been thinking AliasTuple is likely the best name. It goes right along with "type tuple" and "expression tuple". If we were designing from scratch, I'd say this thing is called Tuple, and std.typecons.Tuple would be ExpressionTuple.

-Steve

Reply via email to