3 ms·
>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
by carlmr 9y ago
>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.
- cmollis 9y agodoes Rust basically have the same 'move' semantics as C++ ?
- steveklabnik 9y agoYes 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 9y agocool.. I didn't realize that move meant memcpy.. does this operation destroy the original object?