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

Most C compilers are written in C++ nowadays.





Yes, C and C++ have an odd symbiosis. I should have said C/C++.

Most C and C++ developers take umbrage with combining them. Since C++11, and especially C++17, the languages have diverged significantly. C is still largely compatible (outside of things like uncasted malloc) since the rules are still largely valid in C++; but both have gained fairly substantial incompatibilities to each other. Writing a pure C++ application today will look nothing like a modern C app.

RAII, iterators, templates, object encapsulation, smart pointers, data ownership, etc are entrenched in C++; while C is still raw pointers, no generics (no _Generic doesn’t count), procedural, void* casting, manual malloc/free, etc.

I code in both, and enjoy each (generally for different use cases), but certainly they are significantly differing experiences.


Unfortunately we still have folks writing C++ in the style of pre-C++98 with no desire to change.

It is like adopting Typescript, but the only thing they do is renaming the file extension for better VScode analysis.

Another one is C++ "libraries" that are plain C with extern "C" blocks.


Sure, and we also still have people coding in K&R-style C. Some people are hard to change in their ways, but that doesn't mean the community/ecosystem hasn't moved on.

> Another one is C++ "libraries" that are plain C with extern "C" blocks.

Sure, and you also see "C Libraries" that are the exact same. I don't usually judge the communities on their exceptions or extremists.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: