<p><span class="h-card" translate="no"><a href="https://mastodon.social/@tekknolagi" class="u-url mention">@<span>tekknolagi</span></a></span> One thing that really changed my view of Rust and helped me a lot regarding this situation is this discussion about RefCells from the Rust book. <a href="https://doc.rust-lang.org/book/ch15-05-interior-mutability.html" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">doc.rust-lang.org/book/ch15-05</span><span class="invisible">-interior-mutability.html</span></a></p><p>The arrangement of nested environments needed to implement an interpreter is a perfectly reasonable thing to do, but it can't be statically verified by the Rust compiler according to its default set of rules. </p><p>So, instead of fighting the compiler, I try to work with it. Maybe a runtime check is okay.</p>