3 ms·
It's amusing that in a thread about the advantages of Haskell, immutability is being identified as the largest failure a language has made. I don't think immut
by scanr 14y ago
It's amusing that in a thread about the advantages of Haskell, immutability is being identified as the largest failure a language has made.
I don't think immutable Strings are a bad idea but I do think it's unfortunate that Java:
- Made Strings immutable, used them everywhere, and only later worked out that perhaps CharSequence would have been better in a lot of places.
- Didn't provide a sensible way to handle Object extensions
- ben0x539 14y agoA class being final means that you can't derive from it in Java, not that instances of the class are immutable.
- healthyahoo 14y agohttp://healthyahoo.net/weight_loss/10-tips-for-fast-weight-loss.html http://healthyahoo.net/weight_loss/10-tips-for-fast-weight-l...
- cashew 14y agoTo ensure immutability of a type in Java, you typically need to prevent it from being extended.