of hash functions from a given single hash function.
This is not possible in any meaningful way: hash functions
without a seed argument are a black box. The most you
could do is apply some deterministic function to the result,
which would shift around the values, but all hash collisions
would remain the same. You might be able to alter
bucket collisions of objects with different hash values, but
this is useless from a security perspective and dubious
from a performance one.
The SRFI adds new features:
1. constructors can take 1 or 2 hash functions
2. a new environment variable to control initial seeds
3. make-*-hash functions
All put additional burden on both the SRFI implementor,
and the latter two on anyone who wants to write a new
hash function (they must parse and use the env var, and
must provide hash function generators).
Users, on the other hand, are confused as to whether
provide 1 or 2 functions. In hopes of performance they
should provide 2, even though both may not be used, and
the idiom for hash table construction becomes:
(make-hash-table
(cons (make-equal-hash (random-integer))
(make-equal-hash (random-integer)))
equal?)
This is far too verbose, so presumably we need to add
a utility, possibly:
(make-hash-table (make-hash-pair make-equal-hash) equal?)
and presumably another utility to get an integer from the
env var.
This is a clear example of piling feature on top of feature,
in a way that creates more work for everybody.
However, using a hash function signature of:
(hash object salt bound)
can remove the need for all of these features and is
still more general (e.g. it supports tables that want 3
or more functions).
The extra work goes away. Implementors that care
about security and/or want to experiment with multiple
hash functions can do so, and user code just works.
Most R6RS programs will work unmodified, with the
exception of those that create custom hash functions,
or manually apply hash functions. The argument that
even those should continue to work is invalid because
adding the optional bound argument already breaks them.
--
Alex