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

As I said here[0], although I can't speak for what @Dylan16807 intends, invariants required by unsafe code are required exactly to the extent that some code can alter the invariants (the module boundary). In this sense, Rust's unsafe is just a particular example of encapsulation, where all notions of invariants in programming have the same essence.

[0] https://news.ycombinator.com/item?id=46030407





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

Search: