On Monday 20 October 2008 05:47:40 Chad Walters wrote:
> I wonder if we are making too big a deal about this hashing issue for
> Python.
>
> How is the situation in Python really different from the situation in Java?
> They seem very similar to me, but we don't seem to have a problem with
> depending on the usage conventions in Java.
>
> Sorry If I am missing something obvious.

As David pointed out, the convention in Java is to trust the developer. 
However, adding immutability has several other benefits (those who use pure 
functional languages already enjoy them), such as not having to defensively 
copy objects, thread safety is inherent, etc.

It has been a while since I worked with Java, but I remember that Joshua Bloch 
strongly recommended in his Effective Java book to make classes immutable, I 
don't remember his exact words but he put a lot of emphasis.

Cheers.

Reply via email to