Comments on DMD frontend.

Leandro Lucarella llucax at gmail.com
Fri Feb 29 06:02:04 PST 2008


Bill Baxter, el 29 de febrero a las 06:56 me escribiste:
> Julio César Carrascal Urquijo wrote:
> >Bill Baxter wrote:
> >>You gotta be kidding.  I've seen lots of extensions used for C++ code, but never .c.
> >>file.cpp, file.cc, file.C, file.CC, file.cxx, file.c++, file.C++, yes yes and yes.
> >>But never file.c.
> >>
> >>Calling it "commonly used" is a stretch.
> >>
> >>But I think that being a "barrier to contributors" is a stretch as well.  File naming 
> >>pales in comparison to the other barriers that exist.
> >>
> >>--bb
> >Not as uncommon as I though:
> >http://www.google.com/codesearch?q=file%3A%5C.c%24+%3A%3A
> >There's a lot of C++ code using the .c extension. Specially from Mozilla and the W3C.
> 
> That's a good idea for a search string, but most of those hits have the '::' in a comment, 
> and if you go look at the actual source files, they are indeed plain C code.

This is a more accurate search: "lang:c++ file:\.c$"
It throw 334,000 results.

"lang:c++ file:\.cpp$": 2,190,000
"lang:c++ file:\.cxx$": 293,000
"lang:c++ file:\.cc$": 770,000

Not to mention that, as said earlier, build tools tend to interpret .c as
C code (make for example, use a C compiler for .c and C++ compiler for
.cpp, so is a PITA if you use .c as extension for C++ files has you have
to define the rule for compile them).

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
"CIRILO" Y "SIRACUSA" DE "SEÑORITA MAESTRA": UNO MUERTO Y OTRO PRESO
	-- Crónica TV



More information about the Digitalmars-d mailing list