6 ms·
There are memory-safe programs that the borrow checker will not let you write because of its limitations (and this will always be true, no matter how smart it g
by brundolf 4y ago
There are memory-safe programs that the borrow checker will not let you write because of its limitations (and this will always be true, no matter how smart it gets, and is true of any static type system or checker). This is a conscious tradeoff you make by using the language. It's also why unsafe blocks exist- not so you can intentionally make memory errors, but so you can attempt to safely work around the borrow-checker's limitations
- thesuperbigfrog 4y ago>> This is a conscious tradeoff you make using the language, and it's also why unsafe blocks exist Agreed. Unsafe Rust is needed to handle specific use cases. However, unchecked / unsafe blocks are not needed most of the time and should be used sparingly and judiciously.