3 ms·
Also, ownership checking only seems to work well for tree-like datastructures, but implementing something with cycles (back-pointers) immediately leads to nasty
by amelius 7y ago
Also, ownership checking only seems to work well for tree-like datastructures, but implementing something with cycles (back-pointers) immediately leads to nasty problems.
- zozbot234 7y agoThat's not a problem with Rust, it's a problem with back-pointers. You basically just need to fall back on raw pointers and do all the correctness checking yourself, precisely because the ownership model is not that helpful here. (Although if there is a pattern of "owning" references which involves no cycles plus back-pointers that are actually identifiable as such, that is directly supported via Rc<> and Weak<>.)
- deleted 7y ago[deleted]