Object ID's

Igor Bukanov igor at mir2.org
Wed Mar 21 08:38:51 PDT 2007


A side remark about requiring intrinsic::hashcode to be unique. It can
be extremely expensive to implement that in Rhino since Java does not
require that Object.hashCode returns unique numbers. From
http://java.sun.com/javase/6/docs/api/java/lang/Object.html#hashCode()
:

> As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)



More information about the Es4-discuss mailing list