3 ms·
Although you can access invalid pointers, there are plenty of ergonomic ways not to. If Rust never let you write code that could "go wrong", then it would not
by solidsnack9000 9y ago
Although you can access invalid pointers, there are plenty of ergonomic ways not to.
If Rust never let you write code that could "go wrong", then it would not be useful for its target domain. Sometimes you need a "trust me" block where you call some internal allocator or trusted library function. It's more about the balance of affordances: is it easy to do the right thing in Rust, whereas in C it is easy to do whatever.