jmfayard
09/17/2019, 5:21 AMval (my, destructuring, declaration) = with(object) { Tuple(my, destructuring, declaration)
It’s stil position based obviously since this is what Kotlin support.
But in this case it doesn’t matter because the order of arguments is declared in line, not in another class.
It’s also much more general, it works with much more than “the properties of data classes”. We can put whatever we like in the lambda and transform it to a tuple.
Update: https://youtrack.jetbrains.com/issue/KT-19627raulraja
09/17/2019, 7:57 AMmikkom
09/17/2019, 8:31 AMtupled
would have same positional problems as regular destructuring. Really hoping that named destructuring will make it's way to a future version of Kotlin 🤞