Too bad immutability breaks the quite-ubiquitous-in-JVM-land Bean spec (and I wonder what one was smoking before drawing that spec).
I think having proper sum-types with pattern matching would have also made it a much better language.
I think having proper sum-types with pattern matching would have also made it a much better language.
https://softwareengineering.stackexchange.com/questions/1495...
Immutable objects often require you to construct a new object to store an updated value and garbage collect the now unused previous object. So a lot of early Java code was written with mutable objects to avoid performance issues.
The Java Bean spec was written in 1997:
https://blog.joda.org/2014/11/the-javabeans-specification.ht...