4 ms·
I'm not sure that "it's possible for your program to do this thing and if it does the program will panic" really qualifies as memory-safe. Maybe it's better tha
by notacoward 3y ago
I'm not sure that "it's possible for your program to do this thing and if it does the program will panic" really qualifies as memory-safe. Maybe it's better than what you'd get in C, but in some kinds of programs it could still be a DoS vector. In a garbage-collected language or unsafe-free Rust it would not be possible to crash because of a deleted city, and that would be strictly better.
- sirwhinesalot 3y agoThe vast majority of rust application code has unwrap()s everywhere, not to mention bounds checks on arrays, both of which trigger panics. You can always check the validity of a generational reference before every use, just as you can check the array length or the Result<T,E>