Hacker News new | ask | show | jobs
by qerti 936 days ago
The 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.
2 comments

Just 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.
But 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.