Warning: in the first case “value” is actually a shared reference, not a value.
Warning: in the first case “value” is actually a shared reference, not a value.
You could argue that C++'s new is Rust’s Box::new, and delete is replaced by RAII. Same concepts but way better ergonomy.
I find it’s a mix between ML languages and C++, and knowing one of them would help yes. If you’re tired if chasing a wild pointer because of a subtle use-after-free in a multithreaded monster under gdb, you’ll love #rust.
Regardless of the very subject of the post, linear types and
do.. final
constructs would be a welcomed addition.