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

Issue: HASH-TABLE-ACCESS (version 1)



re: Proposal: (HASH-TABLE-ACCESS:PROVIDE)

      Add the following functions to the language:

      HASH-TABLE-REHASH-SIZE hash-table

	Returns the current rehash size of a hash table.

      HASH-TABLE-REHASH-THRESHOLD hash-table

	Returns the current rehash threshold of a hash table.

      HASH-TABLE-SIZE hash-table

	Returns the current size of a hash table.

      HASH-TABLE-TEST hash-table

	Returns the test used for comparing keys in the hash table.
	By default the value will be either EQL or #'EQL.


Sigh, this issue is one of the very clear "Clarifications" that Guy
Steele issued on 6-Dec-1985, and which have not hitherto been turned
into format "Cleanup" proposals.

For the "Current Practice" section, you can mention that ever since the 
2.0 release Lucid has provided all four accessors, as well as setf methods
for HASH-TABLE-REHASH-THRESHOLD and HASH-TABLE-REHASH-SIZE.   [However, 
they have not been in Lucid's documentation until the 3.0 release].  
Could you be convinced to ask the for two setf "methods" too?


One other request: the return value of HASH-TABLE-TEST should
be among the values of 'EQ, 'EQL, or 'EQUAL -- not among #'EQ,
#'EQL, or #'EQUAL.  I'd actually prefer to see MAKE-HASH-TABLE
restricted to 'EQ, 'EQL, or 'EQUAL since this argument is not
used for it's functional value so much as merely a way to signify 
one choice out of three possible.  But this is probably too much
backwards incompatibility for too little return; at least the
accessor function doesn't have to perpetuate the myth that
any old function of two arguments is acceptable as a hash-table
:test argument.



-- JonL --