Never use vars in a data class. Only val. With imm...
# android
j
Never use vars in a data class. Only val. With immutable objects a shallow copy is equivalent to a deep copy!
☝️ 3
i
also, var = reassigned
a
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
Thanks you all! Do you have any solution for deepcopy with
Data Class
or normal
Class
?