On Tuesday, 21 July 2015 at 21:26:24 UTC, Daniel N wrote:
On Tuesday, 21 July 2015 at 16:54:54 UTC, H. S. Teoh wrote:

Because, among other things, it auto-expands.


T

1) .tupleof auto-expands and changing it at this point would cause epic breakage.(I also see no reason to.)


This is actually a very good point. First of, tupleof does not return a TypeTuple, but they have something similar in nature. This concept need a name, preferably a name that do not elicit confusion.

Even if we dodge the problem now by going for Aliases, this concept would still require a name. Using tuple for that concept just confuses people.

2) Even the tuple in std.typecons has a manual .expand property, i.e. it may not be auto-expanding but it reaffirms that expanding is a common operation on tuples.(the same is not true for arrays, lists, etc.)


If tuple have an .expand property, it is because the tuple and the expanded version of it are two different things.

This is confusing to name that thing a tuple as well. I do think this would be a mistake to name this anything like array or list as, if close, they are not quite the same and I suspect these name would elicit the same result as tuple does. That being said, I can only speculate for these, while I can assert it for tuple.

3) At the risk of sounding like a broken record: Tuple is the poster-child of heterogeneous constructs.

Yes, I know that strictly speaking, a tuple may well be auto expanding. But here you get into the Monad problem (ie: once you understand what a monad is, you loose all capacity to explain it to someone who don't).

There is the strict definition of the word, and there is what people expect out of it. When going academic, you want the first one. But, because you go for the first one, you end up saying things like "A monad is just a monoid in the category of endofunctors" which is certainly true, but won't help much when you try to actually use it.

It turns out that indeed, a tuple may well be auto expanding stricto sensu, but it is not what people expect of a tuple when they meet one.

Reply via email to