An alternative might be something like ExpressibleByTupleLiteral
(e.g. as discussed in this thread).
As that thread points out, the benefit is rather small - we could drop the .init
you have to write today, but that’s pretty much it.
The other option is - if you have a lot of methods which all take a Foo
, write those as member functions on Foo
. Since this is all about “reusable function parameter lists in the form of structs”, I assume there are lots of functions which take a single argument of type Foo
.