3 ms·
> Circumventing the borrow checker Programs often require inherent state with data that refers to other data. In these cases, one must circumvent the borrow ch
by verdagon 4y ago
> Circumventing the borrow checker
Programs often require inherent state with data that refers to other data. In these cases, one must circumvent the borrow checker, whether it be with indices, IDs, Rc, or whatever. The borrow checker simply does not allow changing data when someone has a reference to it (except for the rare case where we can use Cell).
It's a myth that we can rewrite any program to not circumvent the borrow checker.