Implementing ExpressibleByTupleLiteral: how hard?

Why wouldn't we make this match the other literals in the system? I should be able to do:

struct MyThing : TupleLiteralConvertible {
  init(tupleLiteral value: (Int, Int)) {}
}

var x : MyThing = (4, 2)

So yeah, we need variadic generics to make this particularly useful, but we need that anyway.

-Chris

4 Likes