5 ms·
And the borrow checker
by 3836293648 4y ago
And the borrow checker
- tialaramex 4y agoHopefully, if you are transitioning from writing C++ to Rust the basic ideas the borrow checker is enforcing feel pretty familiar. Shared mutable references and references which outlive the thing borrowed are bad ideas in C++ too. You should avoid them, and be careful to use a safe pattern to handle them when/if they become necessary, Rust just has the compiler looking over your shoulder instead of an implausibly good code reviewer.
- pjmlp 4y agoRc<RefCell<>> and .clone() calls everywhere for most GUI applications.