hashabler
hashabler copied to clipboard
Let users be polymorphic in choice of hash function
It might be nice to support allowing users to write code that was hash-function-agnostic, letting their users choose the hash function they prefer. For example someone might create a hash table library using hashabler
and allow their users to swap in FNV-1a
or siphash or a hash function of their own choosing.
I'm not quite sure what this would look like, especially since I'm not convinced the way I've structured the current Hash
and Hashable
classes is that great.
Please comment if you're interested in this feature and mention your use case.
I've created a set of Hash
types of different widths in v1.0. This feature can be done in a separate package if anyone wants it I think.