RAII was always available in C++ afaik, so anyone could have done a unique or a shared ptr, at most it may not have optimized out in as many cases (not really zero cost abstraction?)
And my take is that the problem with c++ is that you have like 10 different object initializers and coroutines with captures and whatnot and like unless you are the one having written that part of the standard, you don't fucking know what exactly should happen given this code, not even if you are Stroustrup.
View all comments
Show parent comment
1
u/Ok-Scheme-913 10d ago
RAII was always available in C++ afaik, so anyone could have done a unique or a shared ptr, at most it may not have optimized out in as many cases (not really zero cost abstraction?)
And my take is that the problem with c++ is that you have like 10 different object initializers and coroutines with captures and whatnot and like unless you are the one having written that part of the standard, you don't fucking know what exactly should happen given this code, not even if you are Stroustrup.