Can't have a HashSet of Rc<RefCell>. I understand why. But I need to at least be able to eliminate duplicates from an array of such things. Any good ideas? Safe Rust only, please.
I know that you can't compare references easily. Why is that? Religious issue from the functional crowd?
Probably because this impl means trying to compare two &T's will result in dereferencing and comparing the underlying T's. So comparing references with == means you'll always get value equality and not reference equality.
I think that has a big flow-on effect, and contributes to why Rust cares so much more about whether two things are equivalent (value equality) rather than being the same object (reference equality).