Opinion of February 2012

Walter Bright newshound2 at digitalmars.com
Sat Feb 4 12:58:21 PST 2012


On 2/3/2012 4:11 PM, bearophile wrote:
> Aren't less than 10 minutes enough to fix this simple problem? I don't know
> why Walter likes to use ".c" as suffix for those files, I don't remember his
> answers on this topic, I have never appreciated this naming decision.

Back in the day, when most of this was started and the African continent was 
still attached to South America, the following extensions were in wide use for 
C++ files:

.cpp
.c++
.cxx
.C (that's capital C; obviously that never worked on Windows)
.c

(and corresponding .h suffixes).

None of them achieved any dominance. I myself used .cpp/.hpp for a while, and 
simply grew tired of it. The compiler sources were originally in C, and when 
they were converted to C++ it was easier to just keep the same file names (and 
yes, .c was also in wide use for C++). All the C++ compilers accepted .c files, 
distinguishing by using a switch (dmc -cpp) or by name (gcc/g++). It just was 
never any problem.

For me, I find worrying about it about as productive as arguing whether tabs 
should be set to 4 or 8.


More information about the Digitalmars-d mailing list