You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the same atom (eg hello) could be represented by a different number for different invocations of the VM. Then, the hash for the same atom would also be different. I don't know if this hurts, but it is probably something to think about.
Yes and also I now see there is Term::hash_internal. And I also see that there is already an implementation for Term:
impl<'a>HashforTerm<'a>{fnhash<H:Hasher>(&self,state:&mutH){// As far as I can see, there is really no way// to get a seed from the hasher. This is definitely// not optimal, but it's the best we can do for now.
state.write_u32(self.hash_internal(0));}}
So seems like a non-breaking change to add it for the Atom type as well, I guess?
So seems like a non-breaking change to add it for the Atom type as well, I guess?
Yes, I think that makes sense. @rusterlium/core opinions? I kinda worry that user's start to write the hash somewhere and assume that it will not change across VM instances.
Can we implement
std::hash::Hash
forAtom
like this:If so, I can open up a PR.
The text was updated successfully, but these errors were encountered: