News for hackers. Stuff that matters.
Re:Moving Java Forward Faster by stickfigure on Thursday September 07, 2017 @01:47AM (#15189392)
Nothing in OOP requires mutable state.

    Thing changedThing = oldThing.change();
When you start writing code like this, Java can be quite pleasant.
Re:Moving Java Forward Faster by jdmichal on Thursday September 07, 2017 @03:13AM (#15189697)
It's only very special circumstances where my POD types do not consist entirely of `final` fields. Though I usually skip defensive copying within PODs... One should know better than to trust values from random places. So I defensively copy at use time instead if I want to modify it.
Re:Moving Java Forward Faster by eropple on Thursday September 07, 2017 @02:26PM (#15194491)
Kotlin, Java's superior offspring, is even better, as the use of data classes provides an automatic implementation of a `copy` command. (Scala does too, but Scala also explodes when I look at it, so, enh.)