23 ms·
That's because you are supposed to do bounds-checking yourself in Rust, not because they don't want to handle it gracefully. It's like happens when you read ou
by angelsl 7y ago
That's because you are supposed to do bounds-checking yourself in Rust, not because they don't want to handle it gracefully.
It's like happens when you read out of bounds in C, except it fails more reliably.
- tsimionescu 7y agoYou're supposed to write correct code in Java as well. The reality is that it doesn't always happen. C doesn't claim to handle the issue at all, and doesn't verify it, which is at least a performance gain. Rust does verify it, but issues an error type that is not guaranteed to be recoverable at all.