Object ID's

P T Withington ptw at pobox.com
Fri Mar 16 05:03:09 PDT 2007


On 2007-03-16, at 05:23 EDT, Lars T Hansen wrote:

> The use case for object IDs seems less clear.

To visually distinguish otherwise similar objects in a debugger, for  
one.

If the language does not support object ID's internally, say in the  
introspection interface, you have a choice of maintaining a table  
(which the GC may already be doing), or annotating (but also  
polluting) the object (which the GC also may already be doing, but in  
a pollution-free manner).  So, while you can simulate object ID's, it  
should be cleaner and more efficient to provide an introspection  
interface to them.  (I'm not suggesting that hashcode should be the  
object ID, just that you might want to support object ID's.)




More information about the Es4-discuss mailing list