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

I found the arguments compelling. The discussion on "Effective types" and C not having a proper concept of objects is key.

Another way to think about it: even if you had defined constructors and destructors for a struct, you have not solved when to call them. C++'s answer to that question is its sophisticated object model. C does not have one, and in order to answer that question, it must. It's worth noting that RAII was not a feature that was intentionally created in C++. Rather, astute early C++ developers realized it was a useful idiom made possible by C++'s object model.



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

Search: