Ideally,
   struct S { int a; int b; }
   void foo(int p, int q);
   S s;
   foo(s);

should work (setting aside for the moment that they are different types). Unfortunately, the variety of function calling ABIs makes this impractical. So tuples in a language like D that must conform to external ABIs is that tuples will always have some rough edges.

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 .

Reply via email to