Yet another MRV proposal!

Janice Caron caron800 at googlemail.com
Tue Apr 15 03:57:56 PDT 2008


On 15/04/2008, Extrawurst <spam at extrawurst.org> wrote:
>  Now i am really confused,

As is everyone

> i confused Tuple's and TypeTuple's cause returing
> a TypeTuple by a functions doesn't work.
> Where is the difference there
> anyway ?

Blame Walter for that. He used the word Tuple to mean something
counterintuitive.

Later, Andrei came along and wrote std.typecons, which uses the word
Tuple correctly (i.e. the same way it's used in every other
programming language under the sun).


> Why need both ?

We don't.


> Why has the normal typecons.Tuple no []-op like the
> TypeTuple ?

It's a different beast. You use it differently. The first ten fields
may be accessed with ._0 to ._9. Any field may be accessed as
.field[n]. Any /named/ field may be accessed by name.



More information about the Digitalmars-d mailing list