3 ms·
You can do anything in C that you want to. Of course one can make v-tables and all of that, and even do inheritance. But having the "class" keyword is nice. Ha
by com2kid 2y ago
You can do anything in C that you want to. Of course one can make v-tables and all of that, and even do inheritance.
But having the "class" keyword is nice. Having built in support for member functions is nice.
Sometimes a person just wants the simplicity of C++ 2003.
(In reality I was working on a project where our compiler only supported C++ 2003 and we had a UI library written in C++ 2003 and honestly pure C UI libraries kind of suck compared to just sprinkling in a bit of C++ sugar.)
- throwaway2037 2y ago> You can do anything in C that you want to. How about destructors?
- com2kid 2y agoYou can obviously build any runtime system you desire in C, including one that parses and executes C code with additional features added in. The wisdom of doing this is questionable. Though I've actually seen macro systems that do things akin to destructors, although less automatically.
- nerfnet 2y agoSurely you are aware that C++ destructors are essentially made in C.