as another data point, Ocaml which is usually quite strict about types and mutability, allows mutable hashtable keys. they, too become unreachable when mutating the key. making a new mutable value with the same contents as the original, unmutated key, does not allow to get the value back. so it's not hashing on content only apparently.
On Monday, October 13, 2014 6:47:40 PM UTC+2, nbbb wrote: > > yes, hashing by identity seems weird since then you could end up with two > keys that are mutable containers with the same values, but hash > differently. this seems a mess. > the only foolproof option seems be to shock-freeze mutable keys on usage, > copying and converting them to immutable values. that also sounds bad. > it seems, either safe and finicky or unsafe (and potentially sorry :) ) >
