On 2012-10-05 04:57, timotheecour wrote:

Why not simply introduce an "expand" property for structs?
----
foo(s.expand) //equivalent to foo(s.a,s.b)
----
That would be the exact analogous of expand for tuples and would
maintain a sane type system .

We already have the .tupleof property:

struct Foo
{
    int x;
    int y;
}

void foo (int a, int b)
{
    writeln(a, " ", b);
}

void main ()
{
    auto f = Foo(1, 2);
    foo(f.tupleof);
}

This works today and I'm pretty sure it has for a long time.

--
/Jacob Carlborg

Reply via email to