Wait, what? What is AliasSeq?
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 9 12:10:38 PDT 2015
On Thursday, 9 July 2015 at 18:45:56 UTC, Marc Schütz wrote:
> Interestingly, it goes on by saying:
>
>> An n-tuple is defined inductively using the construction
>> of an ordered pair.
>
> Although not stated explicitly, this implies (a kind of) auto
> expanding!
> => Fits more than perfectly :-P
No one who has ever seriously used tuples in any programming
language I've ever heard of would expect tuples to auto expand.
Auto expansion makes them _considerably_ less useful. In the case
of TypeTuple/AliasSeq, the situation is a bit different, because
we're not really talking about tuples here. Real tuples nest, and
they don't auto expand. TypeTuple/AliasSeq is the _only_ case
I've ever seen where someone tried to claim that something was a
tuple when it didn't nest, or it auto-expanded. Folks have been
consistently confused about the differences between TypeTuple and
std.typecons.Tuple and the fact that TypeTuples auto expand. No
one expects it - because tuples just don't do that in any actual
programming languages. I question the validity of your
interpretation of the theory as well, but even if it's valid, it
doesn't match what's done in actual programming languages.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list