Join Slack
Powered by
What's the main use case for TupleX? Why would one...
# arrow
d
dave08
03/21/2024, 4:24 PM
What's the main use case for TupleX? Why would one use them rather than making a custom data class?
s
simon.vergauwen
03/21/2024, 5:13 PM
Their use-case is niche, prefer custom data classes in business code. It's useful when you just need to destructure for example:
Copy code
val (a, b, c, d) = parZip(...) { Tuple4(...) }
Or in generic code, to piece things together. To be honest, I only very rarely use it. Like when I need to combine 10+ validated elements.
👍 1
Open in Slack
Previous
Next