2 ms·
It's about making misuse difficult. Rust doesn't actually restrict much. It would take looking at lots of details, but my impression is that it's less restrict
by marcosdumay 3y ago
It's about making misuse difficult.
Rust doesn't actually restrict much. It would take looking at lots of details, but my impression is that it's less restrictive than C.
- qerti 3y agoThe rust compiler refuses to compile code which doesn’t adhere to a strict set of rules guaranteeing memory safety. Unless you intentionally call an unsafe block, misuse in this sense is impossible, not just difficult.
- db48x 3y agoBut other types of misuse are not. For example, a naive program might do many reads into a small buffer instead of one read into a large buffer.
- Yoric 3y agoJust stating the obvious: breaking memory safety is only one subset of all the possible misuse available in the space of manners of using an API, data structure, etc.