Join Slack
Powered by
Never use vars in a data class. Only val. With imm...
# android
j
Jacob
08/31/2021, 3:58 AM
Never use vars in a data class. Only val. With immutable objects a shallow copy is equivalent to a deep copy!
☝️ 3
i
itnoles
08/31/2021, 3:59 AM
also, var = reassigned
a
Adam Powell
08/31/2021, 5:31 AM
Additionally, the hashCode of an object changing while it's currently a key in a table somewhere is not a recipe for a fun time
s
Sam
08/31/2021, 11:02 AM
Thanks you all! Do you have any solution for deepcopy with
Data Class
or normal
Class
?
Open in Slack
Previous
Next