On 2012-10-04, 20:56, Tommi wrote:
On Thursday, 4 October 2012 at 18:12:09 UTC, Timon Gehr wrote:
void main(){
fun(getTuple().expand);
}
Great, that works for me. It would be probably confusing if they tuples
expanded automatically; non-obvious if you'd be passing one argument or
multiple.
There's another reason:
void foo(T)(T, int, float);
void foo(T)(string, T);
Tuple!(int, float) getTuple();
foo("Hello", getTuple()); // What to call?
And:
void baz(T...)(T t);
baz(getTuple()) // Expand or not?
And while this is a constructed example, there is also the matter of
exponential possibilities for the overload system (Oh, so that didn't
work, maybe if I expand *this* tuple? No. *That* tuple? ...)
--
Simen