3 ms·
&T is Copy, so I'm not sure what you mean with the first bit. For the second one, consider Box<T> vs uniq_ptr<T>; Rust can statically prevent use after-move, C
by steveklabnik 9y ago
&T is Copy, so I'm not sure what you mean with the first bit.
For the second one, consider Box<T> vs uniq_ptr<T>; Rust can statically prevent use after-move, C++ cannot, and you'll get a NPE. That is, you can totally get rid of a GC through only RAII, but you can't guarantee memory safety (as far as we know!) without affine/linear types.