5 ms·
This article explains very well what's the issue and how C++ ended up with the design it has (spoiler: incrementally, with backwards compatibility constraints).
by pornel 4y ago
This article explains very well what's the issue and how C++ ended up with the design it has (spoiler: incrementally, with backwards compatibility constraints).
Simplifying it to single ownership with moves that don't leave "unspecified state" copies behind makes so much sense. It's easier to reason about, it lets the compiler catch accidental use-after-move, and avoids redundant object state and dtor calls.