Alan Bawden wrote:
The Java compiler has no way to know whether a variable references an
object with a finalize() method that has side effects

It should be able to tell in some situations, e.g.

    String a = "hello";
    String b = a.replace('e', 'u');

There's no way that b can reference anything other than a
plain String instance at this point.

Maybe Java implementations are living dangerously and making
assumptions beyond this. My point is that I would expect a
Python implementation to be careful enough not to get this
wrong.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to