News for hackers. Stuff that matters.
Re:My gamedever wishlist for Rust by anon4 on Thursday October 01, 2015 @01:07PM (#10312674)
C++ is the only language I've used, where a collection of completely reasonable decisions led to the situation that "if (a == b)" worked fine, but "if (b == a)" crashed the program due to a failed assertion.

And we weren't even using any templates!

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?
Re:My gamedever wishlist for Rust by flohofwoe on Thursday October 01, 2015 @04:26PM (#10314404)
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.
Re:My gamedever wishlist for Rust by devit on Thursday October 01, 2015 @07:31PM (#10315548)
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.
Re:My gamedever wishlist for Rust by FreeFull on Thursday October 01, 2015 @01:43PM (#10312980)
I imagine depending on the assumptions, the same could happen in Rust, given Rust allows overriding equality too.
Re:My gamedever wishlist for Rust by Retra on Thursday October 01, 2015 @06:43PM (#10315312)
Most of the time in rust, you can just `#[derive(Eq)]` and be done with it, so those kinds of things are far less likely.