3 ms·
You can track all of this (things like Rc or Arc do) except move. Relative pointers are possible, depending on what you mean. Making this safe (e.g. preventing
by remram 3y ago
You can track all of this (things like Rc or Arc do) except move.
Relative pointers are possible, depending on what you mean. Making this safe (e.g. preventing users of that type from breaking the relative addressing) is done via the Pin type.
- dataflow 3y ago> You can track all of this (things like Rc or Arc do) except move. Which means you can't track this. Tracking moves is fundamental here. > Relative pointers are possible, depending on what you mean. Pretty sure they're not possible in the sense I mean, for the same reason as above - you need custom moves for this. I'm referring to a pointer (not an offset; a pointer) that automatically adjusts itself when copied or moved. So that it always points somewhere N blocks before/after itself. These are just two examples, to get the point across that Rust actually lacks some capabilities (since somehow that surprises people). You can find more.
- remram 3y ago> Tracking moves is fundamental here. I mean, arguably. If it is fundamental for your hypothetical use case, then sure, but this is not required for a lot of use cases, like smart pointers.