3 ms·
> since raw pointers can only be dereferenced in unsafe code Sure, and "unsafe" is not only a huge red flag but can and should be tightly scoped and can then b
by Lev1a 4y ago
> since raw pointers can only be dereferenced in unsafe code
Sure, and "unsafe" is not only a huge red flag but can and should be tightly scoped and can then be audited much easier than chasing around NPE through an entire Class or even codebase.
Secondly, I've used Rust for a few years now and have NEVER needed to or thought of using raw pointers once. It's unnecessary for almost every single usecase I can think of except maybe OS or driver development but even then you can tightly control where "unsafe" uses pop up.