Monday, February 1, 2010

An 'x' is not a '+'

Idk who thought that "cxx" was a good way to refer to C++, but all I can say is that an 'x' is not a '+'. 'x' is used as a variable (like DirectX), and an 'x' looks kinda like a '+' rotated 45°. So either, cxx means c-anything-anytyhing, or it means that it's ok to roteta randow letters whenever yon want.
The C pre-processor (which is very similar to the C++ pre-processor) is also commonly referred to as CPP which might cause some confusion in certain circumstances (especially if you output the pre-processed files with .cpp as suffix), which might be one reason to use .cxx/.hxx.

-- http://www.phwinfo.com/forum/comp-lang-cplus/329968-what-difference-between-cpp-h-vs-cxx-hxx.html
Ok, the C Pre Processor is a general purpose text processor that the C language depends on. It is not at all dependent on the C programming language, so the name C Pre Processor is an objectively bad name.

Furthermore, why would you name something after the process that produced it? if you call the output of the C Pre Processor "cpp files", then you should probably call the original source files "vim files". Name things after what they are or where they're going, not how they got where they are. The ".o" file extension on object files is for "object" not for "output". The extension ".out" for executable files is a bad choice.

The reason for this rant is that cmake tells me it's compiling CXX objects. Why in the world would cmake use 'X's instead of '+'s? It's not like '+'s are special characters in status messages.

1 comment:

thejoshwolfe said...

According to wikipedia's list of programming languages, "CXX" could mean:
C--
C++
Cat
Cel
CHR
CIL
CLU
COL
Coq
CPL
csh
CSP

So maybe when cmake says "Compiling CXX objects", it's talking about objects from any of these languages.

Also Eclipse CDT refers to C++ as "CC" at least in project nature identifiers: "org.eclipse.cdt.core.ccnature". Way set a good example, CDT.