3 ms·
It’s just a change in jargon for ‘marketing’ reasons. For example: Rust will silently wrap signed integers in release mode even when it’s considered a bug and
by fooker 2y ago
It’s just a change in jargon for ‘marketing’ reasons.
For example: Rust will silently wrap signed integers in release mode even when it’s considered a bug and crashes in debug mode.
- Slyfox33 2y agoSigned overflow is not UB in rust. That's not the same thing at all.
- fooker 2y agoIt’s not. You have missed my point.
- sixfiveotwo 2y ago[dead]
- rcxdude 2y agoThat is pretty much the only example where there's a compromise between performance and correctness as a difference between release and debug mode, and note that it's a) not undefined behaviour and b) does not violate any of rust's safety guarantees. Every other example you mention is done by rust in release mode and the performance impact is minimal, so I would say it's a good counterexample to your claims that defining these things would hamstring performance (signed integer overflow especially is an obvious no-brainer for defining. Note that doesn't necessarily mean overflow checks! Even just defining the result precisely would remove a lot of footguns).