Borrow checker practices
In a recent post there was discussion about where new people will struggle with the borrow checker.
It's a joke where I'm just mentioning some of the common areas where new people will struggle with the borrow checker.
People from a lot of object oriented languages store mutable references to lots of objects with methods on them everywhere. This isn't possible in rust without arc Mutex, or RC Refcell. (Which means you should structure your application into who owns what data and not which things have arbitrary methods).
For example, the object oriented approach is well described in many books. So, learning it once you can apply this knowledge to many OO languages.
And I can generalize it even outside OOP - it’s common that there are data entities, with their behavior, which typically will mutate the entity itself and potentially its children.
And looks like the only answer is using Rc<RefCell<Box>> to read and mutate data at the same time, which is considered a bad practice as I understood and won't solve all problems anyway.
Question - is there any book describing "data owed" approach or proper RUST way? Because I heard it many times - don't use concepts you used in other languages, but no one mentions what are the right ones.