Re: hash functions should not be required to accept two arguments
John Cowan 11 Nov 2015 05:53 UTC
Taylan Ulrich Bayırlı/Kammer scripsit:
> I agree with Alex on that simple hash table operations should not
> allocate though. I would hope for an implementation of e.g. R6RS
> hashtables to only work with fixnums in its implementations of
> equal-hash, string[-ci]-hash and symbol-hash.
There is nothing to prevent an implementation from doing so. My
sample implementation of SRFI 128 reduces lists, vectors, and
strings mod 2^20 rather than taking the risk of overflowing into
a flonum on Scheme systems (such as plain Chicken) where that is
possible.
--
John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org
But that, he realized, was a foolish thought; as no one knew better than
he that the Wall had no other side.
--Arthur C. Clarke, "The Wall of Darkness"