5 ms·
It's mildly upsetting to me that the usual file extension for C++ isn't .c++, or for that matter .C++ Why shouldn't it be?
by rm445 5y ago
It's mildly upsetting to me that the usual file extension for C++ isn't .c++, or for that matter .C++
Why shouldn't it be?
- SloopJon 5y agoProbably because "+" is a special character in most shells. You'd have to quote the filename every time you did anything with it. Edit: morning brain fart. Actually, I guess "+" is not all that special.
- Athas 5y ago`.cpp` is very common. I never understood the point of `.C`; even ignoring issues with case sensitivity, it is too easy to visually confuse with `.c`, and doesn't even have much of a mnemonic connection to the name C++.
- muststopmyths 5y agoAccording to wikipedia "+" is a reserved (prohibited) character in old/classic FAT file names https://en.wikipedia.org/wiki/Filename#Filename_extensions https://en.wikipedia.org/wiki/Filename#Filename_extensions My recollection is that the first Unix C compilers (Cfront?) used ".cc" for c++ and Microsoft started using ".cpp" , probably because of the above restriction.