Lurker News
Back to discussion

Comment by carlmr

carlmr1 reply#
>Oh and also: learning one will certainly help you learn the other in many cases. I advocate learning many languages :)

Especially the Rust borrow checker will make you mad in the first place, and then teach you something about memory management you will be able to use in C++. It really improves your mental model in places you didn't expect.

cmollis1 reply#
does Rust basically have the same 'move' semantics as C++ ?
steveklabnik1 reply#
Yes and no. The idea is the same, the implementation is very different.

Rust is “move by default, move always means memcpy (and they often can be elided), no move constructors,” to (possibly too) succinctly describe it.

cmollis#
cool.. I didn't realize that move meant memcpy.. does this operation destroy the original object?