3 ms·
> all can cause even Rust programs to fail at runtime For sure, a safe Rust program can fail in a dozen different ways. My favorite is just creating an unsigne
by oconnor663 9y ago
> all can cause even Rust programs to fail at runtime
For sure, a safe Rust program can fail in a dozen different ways. My favorite is just creating an unsigned 0 and trying to subtract 1 from it -- in debug mode that'll panic and probably crash the whole program. But unless you touch the `unsafe` keyword, it should be impossible to fail in a way that causes undefined behavior. That's the big difference.
Edit: You're right, I missed the point :| :| :|
- falcolas 9y agoThe whole article is about preventing undefined behavior WRT memory allocation and deallocation, so that's kind of beside the point.