Re:My gamedever wishlist for Rust
by tarpherder on Thursday October 01, 2015 @02:29PM
(#10313444)
I fail to see how reasonable decisions lead to the situation where a == b works "fine" while b == a effectively crashes the program. Could you elaborate what the reasonable decisions were?
Yeah, this sounds more like a and b are different types but somebody messed up overriding equality operators. I wouldn't blame the language for that.
That's possible in any language that doesn't force you to include a computer-checkable proof that your overridden equality operator forms an equivalence relationship.
I imagine depending on the assumptions, the same could happen in Rust, given Rust allows overriding equality too.
And we weren't even using any templates!