3 ms·
> Oh, you mean like how you have rvalues, lvalues, xvalues, glvalues and prvalues[1]. In Rust you have value, ref and mut ref. That is not a reasonable compari
by kllrnohj 8y ago
> Oh, you mean like how you have rvalues, lvalues, xvalues, glvalues and prvalues[1]. In Rust you have value, ref and mut ref.
That is not a reasonable comparison and you know it. rvalues & lvalues are the only things in C++ that you ever care about in the slightest unless you're writing a compiler, and if you're writing a compiler then Rust has things like xvalues, too (how do you think the Drop trait works?)
- vvanders 8y agoAnswer me a simple question, why does std::move exist then? (here's a hint, Rust doesn't need xvlaues because every value already has an associated lifetime)