[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


   Date: Mon, 12 Sep 88 15:45 EDT
   From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>

   I would propose that modifications to components of the key do not
   affect EQ and EQL hash tables, and thus are allowed, but are not
   allowed for EQUAL hash tables when the modification is to a component
   that is examined by the EQUAL function.

This makes sense, since EQ and EQL hash tables use the identity of the
object as the key, while EQUAL hash tables use the structure of the
object as the key.  Component modification changes the structure of an
object, while the identity of an object cannot be changed in Common
Lisp.  On p.168 of CLtL the following comment is found under

"It is an extremely bad idea to modify a string being used as the
print name of a symbol.  Such a modification may tremendously confuse
the function READ and the package system."

This should be generalized to apply to any object which is used as a
key in an EQUAL hash table.