On 2015-07-16 10:00, "Marc =?UTF-8?B?U2Now7x0eiI=?= <[email protected]>"
wrote:
What I meant is that there is no equivalent to the behaviour of TypeTuples:
assert(is(TypeTuple!(int, float, TypeTuple!(string, int)) ==
TypeTuple!(int, float, string, int));
TypeTuple!(int, int) a;
a[0] = 1; a[1] = 2;
void foo(int, int);
foo(a); // works
But not in Ruby:
[1, 2, [3, 4]] != [1, 2, 3, 4]
def foo a, b ; end
foo([1, 2]); // doesn't work
foo(*[1, 2]); // but works with splat operator
Maybe auto-flattening is a better name for this behaviour?
My point is that there is no type in Ruby that is inherently "splatty",
rather it's the operator that produces this behaviour. Therefore,
"splat" is not used as a noun to signify such a type.
I see what you mean now.
--
/Jacob Carlborg