logoalt Hacker News

raluktoday at 11:37 AM2 repliesview on HN

What are protental issues with compiler, by just disabling borrow checker? If I recall correctly some compiler optimisations for rust can not be done in C/C++ because of restrictions implied by borrow checker.


Replies

0xdeafbeeftoday at 12:01 PM

Rust can set restricts to all pointers, because 1 mut xor many shared refs rule. Borrow checker empowers this. https://en.wikipedia.org/wiki/Restrict

show 1 reply
vanviegentoday at 12:38 PM

Without the borrow checker, how should memory be managed? Just never deallocate?

show 2 replies