4 ms·
Rust doesn't guarantee no crashes. It guarantees protection against certain errors e.g. use-after-free and out-of-bounds indexing, some of which can't be done s
by caconym_ 10y ago
Rust doesn't guarantee no crashes. It guarantees protection against certain errors e.g. use-after-free and out-of-bounds indexing, some of which can't be done statically at compile time, so if Rust didn't crash e.g. when you index an array out-of-bounds, it wouldn't be doing its job.
It'll also let you do whatever you like if you write `unsafe` code.
- jfoutz 10y agoAnd unsafe is tagged. You don't have to look at the entire codebase, just the few unsafe blocks. Those bugs are often subtle. Any way to restrict where to look is super helpful.
- bluejekyll 10y agoIt's not actually "whatever" you want. It drops a number of restrictions, but still guarantees some others that C doesn't for instance. https://doc.rust-lang.org/book/unsafe.html https://doc.rust-lang.org/book/unsafe.html