[net.lang.st80] Question about Berkeley Smalltalk

rej@cornell.UUCP (09/20/84)

From: rej (Ralph Johnson)
I have not used any of the Smalltalk systems, but I have read about
several, and we should have Berkeley Smalltalk up soon.  I was 
impressed by some of the tricks used in Berkeley Smalltalk (as
reported in the recent conference on programming environments)
especially the eradication of the object table, using the absolute
address of an object as its object pointer.  How does one implement
hashing when there is no object pointer?  I assume that normally
the hash value of an object is just its object pointer expressed as
an integer.  The absolute address of an object can not be the hash
value because the object can be relocated, and its hash value will
change.  It cannot be a function of the value of an object, because
that changes too.  Since the hash value is used to quickly find an
object in a dictionary, it must remain constant over the life of an
object.  The only solution I can see is to add a hash field to every
object, and that seems expensive in space.  How is the hash function
implemented in Berkeley Smalltalk?

Ralph Johnson (rej@cornell   cornell!rej)