|
|
|
|
|
by spacelizard
3460 days ago
|
|
I have too but I don't see any magic in Rust's borrowing beyond what you would get with using shared_ptr, weak_ptr and move semantics in C++11. Yeah there is a certain class of errors that the Rust compiler will check that will still give you a segfault in C++. But it doesn't get around the programmer still needing to have a firm understanding of RAII and the difference between the stack and heap in order to be effective in either Rust or C++, or Golang, or C99, or what have you. |
|
The thing is that even with unique_ptr I can easily reach in via get() and I've broken the shared mutable state contract. It's trivial for me to trace what modifies things in Rust, I just follow the 'mut' annotations and since only one thing can hold it at a time it's very straightforward.
Rust also has one the best package managers I've seen. Union types which are the best way to represent states and state machines bar none. An iterator class that's the best I've seen(seriously has anyone actually used <algorithm>? How man begin/end pairs do I need?).
Plus the community is super-welcoming, there's more reasons but those are my top ones right now.