3 ms·
> Rust doesn't check for numerical over and underflows unless you run in debug mode which almost no one does because it is about two times slower than release m
by staticassertion 6y ago
> Rust doesn't check for numerical over and underflows unless you run in debug mode which almost no one does because it is about two times slower than release mode.
Totally, I wish Rust could express over/underflows better!
> Rust doesn't live up to the safety standards many programmers coming from dynamic languages are used to where over and underflows are checked.
> Rust doesn't live up to the safety standards many programmers coming from dynamic languages are used to where over and underflows are checked.
Yeah, that's possible. Thought it won't lead to unsafety, it is definitely a gotcha.
> Many people in the Rust community appear to be unaware of this. Which is actually a big deal.
Maybe, not sure.
> If safety was my primary concern, I wouldn't choose C++ but I wouldn't choose Rust either.
Really depends on the goals and constraints, of course. I'd be really concerned about using rust where an integer overflow could kill someone. I'd be really happy to use rust where a program crashing is totally acceptable, but exploitability isn't.