2 ms·
"The advantage here is that, if and when there are bugs in this code, you only have to look at the modules containing those unsafe invocations, rather than the
by mcguire 6y ago
"The advantage here is that, if and when there are bugs in this code, you only have to look at the modules containing those unsafe invocations, rather than the entire codebase."
I would be cautious with statements like that. You can limit some kinds of operations to unsafe code, audit the daylights out of those, build abstractions that make it impossible to use that unsafe code from safe code in an unsafe manner, and still not be doing the right thing.
- steveklabnik 6y agoSure, I thought the context of this discussion was memory safety specifically, and so that's what I was talking about. In a less specific conversation I would have said "memory safety bugs," but thought it would be redundant here. I guess not.