Opinion of February 2012

Bernard Helyer b.helyer at gmail.com
Sat Feb 4 13:03:35 PST 2012


On Saturday, 4 February 2012 at 20:58:23 UTC, Walter Bright wrote:
> 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.

Except it consistently confuses people and tools. .cpp or .cc is 
all I see nowadays, and DMD should modernise. Things may have 
been different in the (eighteen) eighties, but get with the times!



More information about the Digitalmars-d mailing list