On Fri, Apr 3, 2009 at 10:18 AM, Alex Queiroz <[email protected]> wrote: > > On 4/3/09, leppie <[email protected]> wrote: > > What is the rationale for making the hash value non-negative? > > > > Maybe because the output is supposed to be used as an index into > some hash table array. > Not that I support leppie's idea, but I don't see anything in the R6RS interface for hashtables that requires the hashtable implementation to actually implement the standard defintion of a hash table, i.e. based on an actual table.
Unless I've missed something, you could implement the interface with trees or even association lists. The hash function is just for making the underlying mapping (assoc list, tree, standard hash table, etc) operate on the key domain quotiented by the equivalence relation induced by the hash function. I don't know how leppie would apply this to scheme vectors, but it would certainly be viable for trees and assoc lists. Lynn _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
