On Tuesday, 2 June 2015 at 18:48:16 UTC, rsw0x wrote:
On Tuesday, 2 June 2015 at 11:49:18 UTC, anonymous wrote:
On Tuesday, 2 June 2015 at 08:10:27 UTC, rsw0x wrote:
The tuple page is even confusing me
http://dlang.org/tuple.html

A variable declared with a TypeTuple becomes an ExpressionTuple:
alias TL = Tuple!(int, long);

is it using Tuple!(T...) and TypeTuple!(T...) interchangeably?

Almost.

`Tuple` is defined at the top of the article as `template Tuple(E...) {alias Tuple = E;}`.

"TypeTuple" is later defined as a `Tuple` whose elements "elements are solely types".

So, in the context of the article, `Tuple!(int, long)` is a "TypeTuple", because it's a `Tuple` of types.

The article does not refer to `std.typecons.Tuple` or `std.typetuple.TypeTuple` at all. Specifically, the article's `Tuple` is not `std.typecons.Tuple`. And the article's "TypeTuple" is not `std.typetuple.TypeTuple`. However, going for bonus confusion points, the article's `Tuple` is defined the same as `std.typetuple.TypeTuple`.

That's... really confusing and probably needs a rewrite honestly.

Yep.

Atila

Reply via email to