https://kotlinlang.org logo
#announcements
Title
# announcements
o

oday

08/01/2017, 11:30 AM
can’t I assign to multiple variables a the same time?
h

hho

08/01/2017, 11:36 AM
o

oday

08/01/2017, 11:37 AM
yea but it says here it only works for data classes, and in practice they must be new variables, they cant have been declared before
h

hho

08/01/2017, 11:50 AM
I think that's why they're called "Destructuring *Declarations*" 😉
o

oday

08/01/2017, 11:53 AM
…….
damn it
s

sksk

08/01/2017, 12:07 PM
you mean var a,b,c,d = 5 ? yeah i miss that too 😞
k

karelpeeters

08/01/2017, 4:06 PM
@oday Destructuring declarations also work for objects with operator
componentN()
funtions, basically like operator overloading.