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

Proposals for R4RS



1. It would be nice if R4RS provided the simplest possible support for a
portable implementation of hash-tables.  As far as I can tell, the only things
required are two procedures:

EQ-HASH object
  Returns an integer with the property that (EQ? a b) implies (= (EQ-HASH a)
(EQ-HASH b)).  Implementations are encouraged to make the converse true as well
in as many cases as possible.
  
EQV-HASH object
  Returns an integer with the property that (EQV? a b) implies (= (EQV-HASH a)
(EQV-HASH b)).  Implementations are encouraged to make the converse true as well
in as many cases as possible.

I think that with these as primitives, one can portably write the corresponding
EQUAL-HASH procedure and essentially any other equivalence-relation hashing
function.  Thus, this appears to be sufficient for an efficient implementation
of hashing, working in terms of normal vectors.

Note that no ``unhash'' procedures are provided, so none of the difficulties
that caused OBJECT-HASH and OBJECT-UNHASH to be removed exist here.


2. Is there any reason not to make ``.'' and ``{'' and ``}'' extended alphabetic
characters?  Dot, in particular, is useful for EXTEND-SYNTAX implementations or
other things in that style.  Perhaps someone could simply explain the criteria
for inclusion in or exclusion from that extended alphabetic characters list?

Comments?