News for hackers. Stuff that matters.
Re:Java 1.0 Turns 25 by pfarrell on Saturday January 23, 2021 @04:43PM (#25886439)
Encouraging immutable data objects is “the Kotlin way”, though.

You have explicitly mark properties as mutable (“var” instead of “val”). I didn’t get the value of this at first, but when we started catching bugs at coding tiime that would have been runtime errors in Java, I started to understand. This was among my takeaways from working with it in production for about two years.

Re:Java 1.0 Turns 25 by JulianMorrison on Sunday January 24, 2021 @06:59PM (#25897496)
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.