RFC: Adding a Hashable type class and HashMap/HashSet data types to HP

Yitzchak Gale gale at sefer.org
Mon Nov 29 05:34:46 EST 2010

Johan Tibell wrote:
> I don't disagree that being able to hash everything is nice, but I
> don't think it's crucial. My main interest in having a Hashable type
> class is so we can have containers that can be keyed by hashable
> things, for the types where this make sense (e.g. string like types
> where comparison is expensive.) If all that a Hashable type class
> would give me is the ability to store ByteStrings and Texts in a
> HashMap, that alone would be enough motivation for having one in my
> opinion.

Yes I agree. But on the other hand, it would be a shame to
provide good built-in hashes only for those, even if we leave
the type class open. There is a lot of space between "just strings"
and "everything".


More information about the Libraries mailing list