An unofficial, read-only Hacker News reader. Join the beta →

2035 came early (opens external site)

1035 points by setheron 4 days ago | fzakaria.com | 382 comments on HN

View full thread · View on Hacker News

Comment thread (2)

  1. This matches the case of a lexically scoped variable and no moves. With full RAII, the resources are tracked across their entire dynamic lifetime, not just one lexical block, allowing them to be returned to callers, placed in containers, etc.
    Replies (1)
    1. Not really when taking heap into account, while having the code storage agnostic, which is why you need helper classes like handles or std::unique_ptr, with move semantics, otherwise the RAII story gets rather complicated.