4 ms·
You can always write a borrow checker for Go and have the lifetime annotated in comments similar to how pre-3.7 Python type checkers worked. In Rust, the borro
by sansnomme 7y ago
You can always write a borrow checker for Go and have the lifetime annotated in comments similar to how pre-3.7 Python type checkers worked.
In Rust, the borrow checker is too a separate static analysis stage and not directly tied to code gen. There are Rust compilers without the borrow checker.
- TheDong 7y agoIf you wrote such syntax on top of Go, it would no longer be go, it would be a new language you created. The go authors wouldn't accept it, the ecosystem wouldn't work with it, and it would be fighting an uphill battle rather than just using rust or building a new language. > There are Rust compilers without the borrow checker Then those compilers do not compile rust. They compile a bastardized version of rust whereby programs that are not valid rust programs can compile. Also, can you name these non-borrowck-ing rust compilers? You say there's multiple, so you should be able to at least name one or two.
- sanxiyn 7y agohttps://github.com/thepowersgang/mrustc https://github.com/thepowersgang/mrustc is a Rust compiler without borrow checker.