by OutOfHere · 2y ago · 0 comments
- Dereference a raw pointer
- Call an extern or unsafe function or method
- Access or modify a mutable static variable
- Implement an unsafe trait
- Access fields of C unions
https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html
In C the most basic advanced thing you do is LinkedList. In Rust implementing it with pointers is unsafe and splitting it into two parts is unsafe
Most safety critical projects today are written in C and C++, which have very little compile time checks for safety.
I find this debatable. Even if it were still true, such "whataboutism" is always a piss poor argument.
That most projects in these industries are in C and C++? What do you think they use instead?
Or that C and C++ include very little compile time safety checks? I could see one arguing with the specific phrasing around C++, and maybe giving it a bit more credit here, but it’s still objectively less than Rust has.