3 ms·
> A large Rust project uses unsafe only because its authors don't care enough. This is not true. That might account for some aspects of why there are some uses
by burntsushi 5y ago
> A large Rust project uses unsafe only because its authors don't care enough.
This is not true. That might account for some aspects of why there are some uses of 'unsafe', but it is not true of all uses of 'unsafe'.
The existence of 'unsafe' is itself the clearest demonstration of why you're wrong on this point. Its existence is a practical trade off that acknowledges it is sometimes necessary to use 'unsafe' to accomplish some goal, and that there is a long tail of such uses. Too long to feasibly build and enumerate every such case into the language. The goals might be rooted in functionality or performance or possibly other things.