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
On the JVM side of things, according to Oracle's docs:
If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
The implementation indicates that a custom comparator set is Object.equals to a set with same contents:
Object
(equals [this that]
(cond (identical? this that) true
(= (-> this seq set) that) true:elsefalse))
In this light I suspect that their hashes should be equal.
That said the hashCode and hasheq + hash caching stuff isn't done properly yet I think. I don't fully understand all this stuff yet (also with regards to ClojureScript). If you want to contribute in that direction I'd be happy about your help 😃
Undecided if hashes of regular sets should match with hashes of cc-sets. Need to better understand consequences.
The text was updated successfully, but these errors were encountered: