3 ms·
Have you seen GhostCell[1]? Seems like this could be a solution to your problem. [1]: https://plv.mpi-sws.org/rustbelt/ghostcell/ https://plv.mpi-sws.org/rustb
by kurante 11mo ago
Have you seen GhostCell[1]? Seems like this could be a solution to your problem.
[1]: https://plv.mpi-sws.org/rustbelt/ghostcell/ https://plv.mpi-sws.org/rustbelt/ghostcell/
- Animats 11mo agoYes. There's an implementation at https://github.com/matthieu-m/ghost-cell https://github.com/matthieu-m/ghost-cell Not clear why it never caught on. There have been many attempts to solve the Rust back reference problem, but nothing has become popular.
- zozbot234 11mo agoThe qcell crate is perhaps the most popular implementation of GhostCell-like patterns. But the ergonomics is a bit of a challenge still.
- Animats 11mo agoRight. The whole problem with all this is ergonomics, from the point of view of programmers who don't want to obsess over ownership and type theory. We sort of know how to make this work. It works fine with enough Rc/Weak/etc. But it's a huge pain. I appreciate people arguing over this. It helps. We've seen proposals from people who are too much into the type theory and not enough into ease of use. I used to do proof of correctness work, where the problem is that proof of correctness people are too into the formalism and not enough into killing bugs.