jorge
jorge
Explore posts from servers
MModular
Created by jorge on 3/4/2024 in #questions
Mojo implementation question regarding borrow checker
Hello, I am a student learning about Programming Language Theory and I have a question regarding Mojo's implementation of Borrow Checking. In Rust, borrow-checking is performed by statically analysing the types of variables at compile time. However in Mojo, there doesn't seem to be a type for references, and there also doesn't seem to be any syntax for dereferences. So my question is, how does Mojo perform its borrow checking? Does it automatically add a reference within the scope of the function? What if one needs to dereference? I understand that Mojo's compiler is currently closed source, but if anyone could point me towards any relevant papers, or give any detail on its implementation in contrast to Rust's implementation I would be very grateful. Thanks
5 replies