exoteric said:exoteric said:*snip*
So let me boil it down to its absolute undeniable essence
- structs; for performance reasons (makes sense for tuples as most tuples are less than 10 elements)
- recursion; for composition (tuple.Rest rather than new Tuple<A,B>(tuple.Item1, tuple.Item2); to be fair: representation bias)
- enumeration; for composition (use tuples directly as sequences which, intuitively they are)
- classes; for nominal typing (: INominal<T>)
- flatness; for ease of comprehension and simplicity
- non-enumeration; unmistakeable distinctness, no accidental application of abstraction
The tension here is somewhat like structural vs nominal typing. Is it a duck if it looks, walks and quacks like a duck or is it only a duck if it has duck painted over it?
These are choices. Being aware that there are choices being made for you and what the trade-offs are, is useful. I'm sure there are good reasons for the current design - nevertheless it is interesting to examine other paths of expression
> recursion; for composition (tuple.Rest rather than new Tuple<A,B>(tuple.Item1, tuple.Item2); to be fair: representation bias)
I would call .Rest.Rest.Rest.* a bad design rather than a different representation, get a better name and I may change my mind
> enumeration; for composition (use tuples directly as sequences which, intuitively they are)
And how are you going to enumerate them, return a IEnumerable<object>? That surely ain't cool.