On 10/7/10 12:45 CDT, Michel Fortin wrote:
On 2010-10-07 12:34:33 -0400, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> said:

My suggestion is that we deprecate TypeTuple and we call it AliasTuple
because that's really what it is - it's a tuple of stuff that can be
passed in as an alias parameter.

Personally, I like D built-in tuples; they're so simple. At the core
they're just a group of "things".

They are terrible, awful, despiteful. They don't compose with anything; you can't have an array of tuples or a hash of tuples. They can't be returned a from a function. They spread their legs in function parameter lists without any control (flattening is bad, right?) Built-in tuples are the pitts. The one thing they're good for is as a back-end for std.typecons.Tuple.

If you put only types in the tuple
then it becomes usable as a type, and if you put only values in the
tuple then it becomes usable as a value, and if I put variable
declarations in the tuple then it becomes usable as a single variable
aliased to all those variables, and if I mix all kind of things then
it's just a heterogenous tuple that's probably only suitable as a
template parameter.

Only a fraction of that is true. A tuple is not usable as a value.


Andrei

Reply via email to