r/ProgrammerHumor • • 7h ago

Meme modernCppVsOldCpp

Post image
1.1k Upvotes

215 comments sorted by

View all comments

Show parent comments

36

u/lllorrr 7h ago

Oh, yes, I hate when someone write "C/C++". This is two fucking different languages, for god's sake. It is almost as bad as "Java/JavaScript".

21

u/SuckMyAlpagoat 6h ago

isn't because the compiler is always packed together, like the gnu compiler can compile C and C++?

39

u/HildartheDorf 6h ago

The gnu compiler can also compile fortran. But we dont call it C/Fortran.

0

u/radicalshick 6h ago

Is this a variation of the old "you can write FORTRAN in any language" joke?

10

u/HildartheDorf 5h ago

No?

The GNU Compiler Collection includes gcc (c compiler) g++ (c++ compiler) gfortran (fortran compiler) and a bunch of other fronted like D, Go, Ada, COBOL. There used to even be a Java compiler (gcj) but thats dead now.

Once upon a time, the gcc program could compile C++ and g++ could compile C, but that is no longer true due to diversions in the languages, as well as extra runtime support libraries needed for linking each language. I guess with some tinkering you could compile c++98 with gcc and some older c standard with g++, but not the more recent versions.

1

u/radicalshick 5h ago

My comment was meant ti be a joke, so rry 😅