3 ms·
By that token, Rust is also memory unsafe: array bounds checks and stack overflow are runtime checks.
by ori_b 6mo ago
By that token, Rust is also memory unsafe: array bounds checks and stack overflow are runtime checks.
- DetroitThrow 6mo agoThere are several ways to safely provide array bounds check hints to the Rust compiler, in-fact there's a whole cookbook. But for many cases, yep, runtime check.
- p1necone 6mo agoWhy are you talking like this is black and white? Many things being compile time checkable is better than no things being compile time checkable. The existence of some thing in rust that can only be checked at runtime does not somehow make all the compile time checks that are possible irrelevant. (Also I think the commenter you're replying to just worded their comment innacurately, code that crashes instead of violating memory safety is memory safe, a compilation error would just have been more useful than a runtime crash in most cases)