2 ms·
Isn't that the idea that unsafe code can do unsafe things internally while exposing a safe interface? So in your example the bug would be in the unsafe code, wh
by ptx 3y ago
Isn't that the idea that unsafe code can do unsafe things internally while exposing a safe interface? So in your example the bug would be in the unsafe code, which shouldn't have allowed the unsafety to leak into the safe code.
- BobbyTables2 3y agoYes, but by that same logic, safe programs can also be written C. However, I do believe Rust gets a whole lot of things right. I sincerely hope that unnecessary use of unsafe code is avoided.