← Back to context

Comment by dnautics

8 hours ago

> how about from the other direction, adding some kind of borrow checker to Zig? That sounds more within reach and practically achievable, possibly even in userland.

It's doable, and as static analysis. see sibling comment.

No, it would fundamentally change how Zig works.

  • no, it would not. If you do not believe me, you should try out the repo.

    • the architecture doesn't make sense. MIRI doesn't perform static analysis on MIR. It is, as the name says, an interpreter. The borrow checker is entirely different from miri.

      Rust's borrow checker requires lifetime annotations. Zig code doesn't contain any such annotations. How does your design handle this?