With destructuring declarations in Kotlin, you can create multiple variables from a single object, all at once. Sebastian (https://twitter.com/sebi_io) shows you a selection of things that can be destructured – pairs, lists, maps, and more. And what about your own objects? Kotlin’s component functions provide an answer for those as well.
The issue for object (name-based) destructuring in Kotlin: https://youtrack.jetbrains.com/issue/KT-19627
#KotlinTips #Kotlin #Programming