3 ms·
You can still write memory safety bugs, you just need unsafe. I'm glad unsafe is used in so many libraries.
by oynqr 4y ago
You can still write memory safety bugs, you just need unsafe. I'm glad unsafe is used in so many libraries.
- chousuke 4y agoLibraries are where unsafe belongs. Having unsafe be an explicit feature is immeasurably better compared to every line in the entire program potentially being unsafe. Opting out of safety is fine, but safety must be opt-out to be effective, not opt-in. A standard, enforced way to tell readers where the dragons lie is super helpful.
- Ar-Curunir 4y agoRight, note that I said safe Rust, which is the vast vast majority of Rust out there. This is a major improvement over, say, C, where any line of code could be potentially unsafe.