3 ms·
There is progress. The next near frontier for Rust is to try to figure out how to do back references that are checked at compile time. The contortions required
by Animats 3y ago
There is progress.
The next near frontier for Rust is to try to figure out how to do back references that are checked at compile time. The contortions required to work around the lack of back references are painful and distort program design. You can use reference counts for everything, like Python. You can put all the structs into an array and use array indices, which means you get pointer type errors in indices. Or you can use unsafe code, which means you're back at C++ bug levels.
This is probably a PhD thesis sized problem, to figure out a set of rules and an analyzer to enforce them.
- spoiler 3y agoWhile I agree that manually maintaining objects in memory through indexes is less than ideal sometimes, it's nowhere close to it being the same as managing raw pointers (ie errors are less catastrophic)!
- Animats 3y agoYou still terminate the program or get pointed to the wrong object. You just crash more gracefully and in a more-debuggable way. I am currently using a Rust crate which uses indices for object ownership and just crashed this evening with a subscript error.