2 ms·
> And it's very clear that the user they thought about is an experienced C++ developer. Yes. If you had to work in C or C++, Rust is a huge improvement. If you
by Animats 4y ago
> And it's very clear that the user they thought about is an experienced C++ developer.
Yes. If you had to work in C or C++, Rust is a huge improvement. If you only know Javascript or Python, Rust seems way too finicky.
(If you had to work in assembler, C was a huge improvement.)
Rust ownership is language support for something C and C++ programmers had to think about anyway.
The real problem with Rust ownership is that backlinks are poorly supported.
If you need a tree with links pointing back to the root in Rust, it's very difficult.
There's Rc and Weak, but now you have to use .upgrade() on a weak link before you can use it, and it can fail. You can have all the objects owned by a Vec or HashMap, and refer to them by handle, but that's essentially manual pointer manipulation. Single-ownership with backlinks checked at compile time would be a big help for some data structures.