3 ms·
And if something goes wrong, you can at least narrow down your search to unsafe areas of the code. No. That's only true if the unsafe code presents a completel
by Animats 10y ago
And if something goes wrong, you can at least narrow down your search to unsafe areas of the code.
No. That's only true if the unsafe code presents a completely safe interface to its callers. If the safe code opens a hole in Rust's protection system, which is very easy to do, you can now have C-type no-idea-where-it-is bugs.
- roblabla 10y agoBut the origin of the bug is still certainly in the unsafe areas.
- UtherII 10y agoYes, the crash can come from every line of code, but the origin of the bug is in the unsafe code. That's why unsafe code has to be cleanly inspected to be sure it has a safe interface, and by reducing the dangerous area to only few lines, it is far easier to do.
- deleted 10y ago[deleted]