https://kotlinlang.org logo
Title
t

thomasnield

04/30/2018, 6:08 PM
I know I'm going to get a lot of grief over this, but I'm coming to the conclusion Tuples have a place in Kotlin, primarily for quickly improvising key objects in functional operations. https://github.com/thomasnield/kotlin-statistics/issues/23
k

kz

04/30/2018, 8:38 PM
I missed the conversation but I have also been tempted by tuples. In my scenario it's working with Apache Spark and doing a bunch of small transformations on my way to the actual model object.
I have settled temporarily for an explicit Quadruple data class and a small set of function-local named data classes .
Definitely gets in the way of readability. In a few places I use scala's tuples but then I lose null-safety.