3 ms·
Interior mutability is a principled way to relax the requirements. Multimut exists for really low-level code; it's spelled *mut.
by firethief 7y ago
Interior mutability is a principled way to relax the requirements. Multimut exists for really low-level code; it's spelled *mut.
- jnordwick 7y agoSaying it doesn't make it true. There is nothing principled about it - a pure hack around the borrow checker. It seems to be one of the most unprincipled ways - more like casting away const in c++ And I know what unsafe pointers are, but the special keyword would allow the compiler to understand more about the code's intentions. edit: I take that back. It seems worse. It would as if there was a way to get rid of const by a series of assignments without ever having to explicitly cast it away.
- deleted 7y ago[deleted]