Hacker News new | ask | show | jobs
by epcoa 674 days ago
It is true that there is C code that is conforming C++ code. However I would say if you’re using a C compiler with with “extern C” in the headers for C++ linker compatibility (as this library does) then saying C++ is about as misleading as saying a Rust library is C++ as you can link to that too.

As far as compatibility and “history” the languages are different enough now. There are both: features in C that do not exist in C++, and code that is conforming C that would be UB in C++. Saying C/C++ (for real) is usually a dumb target when it’s better to pick one and settle with that.

If it’s C, just say so. Everyone knows what extern C is, you don’t need to confuse.

1 comments

Even Pascal is closer to C than C++ is, yet historically people use this term implying they are very close.