Closed mooreryan closed 1 year ago
Follow up question, would you accept a pull request that adds those two methods of dealing with larger tuples to the mli docs? Currently it just says:
to describe wider tuple types, use nested application.
The reason for the restriction is that there is duplication of code in the drivers involving these tuples which I have kept there for performance reasons. However, revisiting this I realise we can use the custom type to implement more cases (with slight performance penalty). I'll commit support for up to 8 in a moment.
Thanks!
In #36, the question was asked about how to work with arbitrary tuple sizes. Summarizing that issue, the current way to work with tuples larger than four seems to be
tup2 (tup3 a b c) (tup4 d e f g)
tup2 a (tup2 b (tup2 c (tup2 d (tup2 e (tup2 f g)))))
Is there a technical reason not to support tuples larger than 4 directly? Chaining
tup2 string (tup2 string (tup2 string ...
when you have to work a lot of values/columns in a request/response doesn't feel so nice. (Of course, what feels nice is subjective.)