3 ms·
> Rust gets this right, with the hindsight of C++’s example: “a = b” is a move operation by default and clone() is always explicit Note that a move can still d
by adrian17 4y ago
> Rust gets this right, with the hindsight of C++’s example: “a = b” is a move operation by default and clone() is always explicit
Note that a move can still do a copy; in fact, Rust is kinda notorious for generating more on-stack memory copy operations than C++. It’s slowly improving, but it can still be surprisingly bad in some cases.