Hacker News new | ask | show | jobs
by bit-hack 1863 days ago
I've honestly never seen .C used in the wild. I imagine anyone whose written a bit of portable code would immediately realize this is a bad idea.
3 comments

Haven't really seen it in the wild, but I see it every day in a very large proprietary codebase I work in.
I only know it as an extension for "interpreted C++ scripts" as used by CERN's ROOT. It is considered good practice to make them compilable but the interpreter used to be very lenient (before they integrated it with clang) so that usually didn't happen.

Anyway I would never rely on the C compiler invoking the C++ compiler; I always write g++ or $CXX. I wonder if there is a downside to that.

Just for an example, the OpenFOAM codebase has 'em.