News for hackers. Stuff that matters.
Re:The C23 edition of Modern C is now available for free by com2kid on Tuesday October 15, 2024 @07:57PM (#41854294)
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.)

Re:The C23 edition of Modern C is now available for free by throwaway2037 on Tuesday October 15, 2024 @11:14PM (#41855255)

    > You can do anything in C that you want to.
How about destructors?
Re:The C23 edition of Modern C is now available for free by com2kid on Wednesday October 16, 2024 @04:20AM (#41856788)
You 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.

Re:The C23 edition of Modern C is now available for free by nerfnet on Friday October 18, 2024 @06:58AM (#41878209)
Surely you are aware that C++ destructors are essentially made in C.