3 ms·
I don't see how regular pointers don't solve the problem with non-tree-like data structures in general. In C++, for the most part, for a cyclical or back-linkin
by int_19h 8y ago
I don't see how regular pointers don't solve the problem with non-tree-like data structures in general. In C++, for the most part, for a cyclical or back-linking data structure, you'd just do that, and then have a single "real owner" of the whole thing that knows how tear it down; and that one gets an owning reference. The class of problems that can't be solved in this manner is substantially smaller than the class of problem that can't be solved with tree-like structures only.
Anyway, the point still stands: this is bypassing the borrow checker, because something cannot be adequately handled by it. And by doing that, you're back to square one with all the problems that the borrow checker was supposed to solve.