2 ms·
"Just use unsafe! That’s what it’s there for." No, no. "Unsafe" should not be used because you can't figure out how to do some data structure in Rust. You'll g
by Animats 4y ago
"Just use unsafe! That’s what it’s there for."
No, no. "Unsafe" should not be used because you can't figure out how to do some data structure in Rust. You'll get it wrong.
I have 27,000 lines of Rust in one complicated program with no "unsafe".
- stouset 4y agoFirst, please consider the context of my comment. Second, Rust itself is implemented with unsafe. Self-referential data structures are necessary for some problem domains, and those must be implemented with unsafe. Unsafe exists and is a tool that is sometimes necessary. When it is necessary, it should be used carefully. Just because you haven't needed unsafe personally doesn't mean others don't. And the Rust developers aren't superintelligences capable of using it correctly while the rest of us mere mortals aren't.