3 ms·
In general Java it's still messy because although you can make the value of a variable immutable, the innards of the object it's holding are still mutable. Such
by JulianMorrison 6y ago
In general Java it's still messy because although you can make the value of a variable immutable, the innards of the object it's holding are still mutable. Such as appending to a list.
You have to go as far as Clojure does and create a whole new suite of truly immutable data containers, for full safety. I dunno if Kotlin goes this far. But yeah, it's the right way.