2 ms·
> without the productivity-consuming and mentally burdensome “borrow checker” of Rust The borrow checker also gives you memory safety, which Zig does not have
by pcwalton 7y ago
> without the productivity-consuming and mentally burdensome “borrow checker” of Rust
The borrow checker also gives you memory safety, which Zig does not have at the moment.
Solving use-after-free and related issues is a hard problem. I have yet to see a way to solve it that doesn't boil down to one of runtime garbage collection, not allowing heap allocation at all, not freeing memory at all, or a region system/borrow checking. It's fine to not like the borrow checker, but it's there for a reason.
- pjmlp 7y agoYeah, but currently it still is a roadblock when writing GUI code, to the point that Gtk-rs samples use macros to overcome the boilerplate to access widget data from callbacks.