Closed zajac closed 2 years ago
I think, hashCode could and should be cached for persistent data structures.
hashCode can't be cached if the elements of the container are mutable, because the hashCode could then change without the container knowing.
You're correct, it would not be correct thing to do on the library level.
I think, hashCode could and should be cached for persistent data structures.