Object id, hash, etc?
mike.mcglothlin at gmail.com
Tue Sep 8 15:02:38 UTC 2015
Is there a reason not to provide an object id and hash value as other languages often do? I find myself defining an identity symbol on objects with a value from a simple global counter. It makes it easier to debug if I can just look at a log and see what objects and functions were active.
Likewise a hash value would simplify a lot of comparisons and make it easier to debug.
I especially find the ID useful when working with bound functions as they can be difficult to tell apart. I like to change toString() to provide the ID followed by the code (flattened to one line).
Sent from my iPhone
More information about the es-discuss