3 ms·
They aren’t unless you’re willing to go significantly more complex than this naive translation suggests. As an example, consider the index_mut function with si
by xavxav 3y ago
They aren’t unless you’re willing to go significantly more complex than this naive translation suggests.
As an example, consider the index_mut function with signature
fn index_mut(&mut Vec<T>, ix: usize) -> &mut T
How do you represent this?
However, this insight holds for relatively common forms of ownership, and you can see this exploited in electrolysis: https://github.com/Kha/electrolysis https://github.com/Kha/electrolysis