3 ms·
They had a "feature poll" at a 1.1 event a while back, where one of the features you could vote for was "true immutability". Can't find any links now that expl
by realharo 9y ago
They had a "feature poll" at a 1.1 event a while back, where one of the features you could vote for was "true immutability".
Can't find any links now that explain how that would work though. I just remember that it was completely different from C++'s const-correctness (which is what I assumed at first when reading its title).
- jankotek 9y agoThis was discussed very very early. Basically type system would not allow to declare `var` inside class. It would apply to object graph, so immutable collection could not store mutable objects etc.. Problem is that type system in Java is dynamic at runtime. It is not possible while maintaining interoperability with Java code.