Const Tuples
bearophile via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Apr 25 05:54:24 PDT 2014
Dicebot:
> std.typecons.Tuple is just a subset of all structs implementing
> specific behavior. It still acts as struct everywhere when
> applicable.
A subset is not the same as the whole set.
You are missing something important about what a data structure
is. Take a look at your computer science books.
Another example: a dynamic array allows several operations,
including append at the end and pop from the end. If I define a
Stack data structure based on a dynamic array with just its
pop/append/empty/length operations, I have defined a new data
structure.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list