3 ms·
Hopefully, if you are transitioning from writing C++ to Rust the basic ideas the borrow checker is enforcing feel pretty familiar. Shared mutable references and
by tialaramex 4y ago
Hopefully, 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.