2 ms·
Instead of unsafe, as much as possible should be looking at interior mutability, Cell and RefCell allow for this, with no unsafe, and they guarantee for you at
by bluejekyll 10y ago
Instead of unsafe, as much as possible should be looking at interior mutability, Cell and RefCell allow for this, with no unsafe, and they guarantee for you at runtime that what you believe is accurate.
unsafe should be IMO, reserved for only those cases where strictly needed, e.g. FFI is the clearest example.