Shared mutability in Rust Part 2 of 3: Acyclic graphs

Summary

  • Child entities which are both mutable and shared can make any, or all of their parents invalid.
  • In freeform shared mutability, we cannot cache any calculation that depends on a shared mutable entity.
  • If we limit the scope of sharing to code we trust not to invalidate our cache, then we can cache results as much as we like.
  • Limiting the scope of sharing implies that we have some kind of container entity: an Arena.