Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

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.



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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: