Comments on DMD frontend.

Bill Baxter dnewsgroup at billbaxter.com
Tue Feb 26 13:20:08 PST 2008


Alexander Panek wrote:
> Walter Bright wrote:
>> Leandro Lucarella wrote:
>>> My firt big surprise, and not a good one, was that the frontend files 
>>> are
>>> named with the .c extension, instead of .cpp, .cxx, or anything used for
>>> C++ files. Is there a rationale behind that? I find it very confusing.
>>
>> When I first started with C++, I carefully named all my h files ".hpp" 
>> and source files ".cpp". Over time, the .hpp was dropped in favor of 
>> .h, and eventually .cpp => .c.
>>
>> It's not confusing to me because I never mix C and C++ source files in 
>> the same project.
> 
> Well, but other people might look at your sources the first time, not 
> knowing what language those are actually written in..
> 
> Consistency is one of the good measurements for product quality.

But Walter just said he's consistent about it!  Too consistent -- always 
.c no matter what.

It's consistent, it just doesn't conform with standard practices.

--bb



More information about the Digitalmars-d mailing list