This is a tracking issue for the unstable hashmap_hasher feature in the standard library. This provides the ability to create a HashMap with a custom hashing implementation that abides by the HashState trait. This has already been used quite a bit in the compiler itself as well as in Servo I believe.
Some notable points to consider:
- Is an extra
HashState trait really necessary?
- Is the naming of
HashState correct?
- Is the aggressive use of
Default appropriate here?
- Can the
new constructor be leveraged to create hash maps that use a hasher implementing Default? Right now the new constructor only works with RandomState.
- How ergonomic is it to create a hash map using a custom
Hasher implementation? In theory it should be quite ergonomic.
cc @gankro
This is a tracking issue for the unstable
hashmap_hasherfeature in the standard library. This provides the ability to create a HashMap with a custom hashing implementation that abides by theHashStatetrait. This has already been used quite a bit in the compiler itself as well as in Servo I believe.Some notable points to consider:
HashStatetrait really necessary?HashStatecorrect?Defaultappropriate here?newconstructor be leveraged to create hash maps that use a hasher implementingDefault? Right now thenewconstructor only works withRandomState.Hasherimplementation? In theory it should be quite ergonomic.cc @gankro