Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Your problem is not with RAII, but with reference counting, which you correctly identified should be the last resort, not the default; at least for the applications typically written in C++.


Why should reference counting be a last resort?


Because it's insanely slow, and doesn't support cyclic structures.


... in C++. Because, at least in C++, it is a bad, slow and inconvenient GC. If you want or need generalized GC there are significantly better languages for that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: