News for hackers. Stuff that matters.
Re:Rust traits are a local maxima by pornel on Friday November 22, 2024 @07:08AM (#42213155)
This doesn't solve the hashtable problem:

    Crate A implements Hash(vA) for T
    Crate B implements Hash(vB) for T
    Crate C has a global HashSet<T>
    Crates A and B can both put their T instance in the C::HashSet. They can do it in their private code. Their Hash overrides any external implementation. The trait is used, but not exported.
    C::HashSet now has an inconsistent state. Boom!

There are no comments on this comment yet.