Hacker News new | ask | show | jobs
by scombridae 1263 days ago
It's hard to imagine a C programmer so professionally ignorant that he's yet to realize C++ is a superset of C.
4 comments

>It's hard to imagine a C programmer so professionally ignorant that he's yet to realize C++ is a superset of C.

Ooof. restrict keyword enters the chat. C and C++ are two languages that evolve together, but one is not a superset of the other.

I see this comment a lot, but it's not true (at least not any more). Many valid C programs do not compile through the C++ compiler. The standards for C++ and C have deviated over the years.
lots of good examples of why this is wrong here: https://floooh.github.io/2019/09/27/modern-c-for-cpp-peeps.h...
Ironically your comment it's the ignorant one. Try compiling a large C codebase with g++.