John Cowan writes:
> I'd like to hear from Schemers who make use of hash tables, either
> the SRFI 69 or the R6RS flavor, that need to go beyond the classic
> five equivalence predicates, namely `eq?`, `eqv?`, `equal?`,
> `string=?`, and `string-ci=?`. When do you use them? What
> equivalence predicates do you use? What hash functions accompany
> them?
These are mere thoughts, not the actual usage data you are asking, but
anyway:
Record types. R7RS Draft 9 entry on equal? says nothing about the
equality of records.
Also, one might use procedures as a kind of object, wanting some sort
of structural equality. They will be opaque to equal? even when the
eqv? issue is sorted out.
Perhaps structured objects might have components that should not be
involved in their equality and hashing: components with state, or
components whose equality is not specified.
But mainly record types. It would be quite unschemely to have sets of
pairs, lists, vectors, bytevectors, and then not sets of records.
> Note that in SRFI 69, you can use the `hash` hash procedure for
> `eqv?` as well as `equal?` hash tables, and in R6RS, you can use the
> `equal-hash` hash procedure for `string=?` as well as `equal?`.
--