3 ms·
> Arc/Rc the hell out of it The pattern I keep needing is single ownership with back pointers. That can be done with Rc and Weak, which pushes the checking to
by Animats 3y ago
> Arc/Rc the hell out of it
The pattern I keep needing is single ownership with back pointers. That can be done with Rc and Weak, which pushes the checking to run time. I think it might be possible to do this statically with some extensions to the borrow checker. It's not keeping the forward and back links consistent that is hard. It's making sure that all code sections either have read access to owner and owned, or write access to owner or owned. That's a static analysis kind of problem.
- telotortium 3y agoHave you submitted a proposal to the Rust team about this? It would be interesting to read.