Hacker News new | ask | show | jobs
by PaulDavisThe1st 1650 days ago
> In order to have a reasonably complete language that has RAII and value types, you must also have: - constructors - destructors - overloadable copy assignment operators - placement new - move semantics and rvalue references

C++ didn't have move semantics at all until several decades after it had RAII.

1 comments

Yes, move semantics were added because the language was considered incomplete without them. In particular, because RAII based resources like std::vector could not be relocated without very expensive value copy operations.