(no title)
buildartefact | 2 years ago
That’s not really true. The standard workaround for this is just to .clone() or Rc<RefCell<>> to unblock yourself, then come back later and fix it.
It is true that this needs to be done with some care otherwise you can end up infecting your whole codebase with the “workaround”. That comes with experience.
throw10920|2 years ago
It's a "workaround" precisely because the language does not support it. My statement is correct - you cannot turn the borrow-checker off, and you pay a significant productivity penalty for no benefit. "Rc" can't detect cycles. ".clone()" doesn't work for complex data structures.
mtsr|2 years ago
Except if you go to a GC language, but then you’re prototyping other types of stuff than you’d probably pick Rust for.
lmm|2 years ago