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

Comparing functions



In looking at the definition for make-hash-table, I contend that a valid
implementation has no need for function-comparing primitives.  It does
say that the :test argument "must be one of the threee values 
#'eq, #'eql, or #'equal, or one of the three symbols eq, eql, or equal".
However, as I understand it, "must be" is equivalent to  
"It is an error if not...", which means that the implementation doesn't
have to do anything if the :test argument happens to be something else.
Presumably, the compiler can source-level-optimize calls to MAKE-HASH-TABLE
(as long as the :test argument is a constant) to enforce this, and in fact
can convert such calls to lower-level things (e.g. MAKE-HASH-TABLE-WITH-EQ-TEST
and the like, or what have you).
So if temporary hash tables need to test the :test argument, which they do,
they can't rely on MAKE-HASH-TABLE already having established the need for
the requisite primitive.