digitalmars.D - Comments on DMD frontend.
- Leandro Lucarella (46/46) Feb 23 2008 Hi. I'm starting to play arround with the DMD frontend bundled with the
- Robert Fraser (4/5) Feb 23 2008 If it helps at all (it probably doesn't...) there's a port of the entire...
- Janice Caron (28/36) Feb 24 2008 You can do it without varags.
- Leandro Lucarella (16/60) Feb 24 2008 Yes, but that's a little more uglier and error prone, so if DMC supports
- Walter Bright (5/6) Feb 24 2008 I've used those debug macros in various forms in other projects. Over
- DBloke (5/10) Feb 24 2008 Nowt wrong with C :) especially back end stuff and the like, sadly C got...
- Jarrett Billingsley (5/16) Feb 24 2008 See Dil: http://code.google.com/p/dil/
- Jascha Wetzel (3/7) Feb 24 2008 alternatively see http://seatd.mainia.de :) which is D1, too
- DBloke (2/7) Feb 24 2008 Looking good, D has some excellent programs out there but could really
- Walter Bright (6/9) Feb 26 2008 When I first started with C++, I carefully named all my h files ".hpp"
- Alexander Panek (4/15) Feb 26 2008 Well, but other people might look at your sources the first time, not
- Bill Baxter (5/23) Feb 26 2008 But Walter just said he's consistent about it! Too consistent -- always...
- Leandro Lucarella (25/34) Feb 27 2008 It's not confusing to you! If you do it in a closed source project, it's
- Bill Baxter (11/34) Feb 27 2008 Additionally, some IDEs decide what compiler to use based on the
- Walter Bright (5/16) Feb 27 2008 .c is a commonly used C++ extension, but I understand your point. I'd
- Bill Baxter (10/24) Feb 27 2008 You gotta be kidding. I've seen lots of extensions used for C++ code,
- Robert Fraser (5/34) Feb 27 2008 When I took my first class that introduced C and C++ programming, the
- Bill Baxter (5/41) Feb 27 2008 Weird. I mean I don't even think Stroustrup's own book on his own
- Walter Bright (4/7) Feb 27 2008 You motivated me to look! On page 28 of Stroustrup's "The C++
- Bill Baxter (4/13) Feb 27 2008 Well I'll be darned. I looked for my copy around here before I posted
- Sean Kelly (3/7) Feb 28 2008 I believe ".cpp" historically represented C pre-processor files, in fact...
- Walter Bright (6/12) Feb 27 2008 All I can say is, I have. That's why dmc has a switch to treat .c files
- Bill Baxter (13/27) Feb 27 2008 My experience only goes back to 10 years. It makes some sense that
- bearophile (6/8) Feb 28 2008 I think today ".c++" and "cpp" are rather a de facto standard...
- Anders Bergh (4/5) Feb 28 2008 I don't think I've ever seen ".c++" used. "cpp" and "cc" however seem
- Robert Fraser (2/9) Feb 28 2008 ".c++" sounds like it might be painful for certain file systems.
- =?UTF-8?B?SnVsaW8gQ8Opc2FyIENhcnJhc2NhbCBVcnF1aWpv?= (8/20) Feb 28 2008 Not as uncommon as I though:
- Bill Baxter (25/46) Feb 28 2008 That's a good idea for a search string, but most of those hits have the
- Leandro Lucarella (17/35) Feb 29 2008 This is a more accurate search: "lang:c++ file:\.c$"
- Bill Baxter (5/26) Feb 29 2008 Most of those appear to be capital-C not lower-case c.
Hi. I'm starting to play arround with the DMD frontend bundled with the compiler. 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. Second, I saw the code has a lot of: #if DEBUG printf(...); #endif (LOG or simply 0 are used too) This is really annoying and can easily be changed for something like: #if DEBUG #else #endif (I know macros with variable arguments are just in C99, but I think most compilers has a vendor-specific way of doing it) And then just write: debug(...); This makes the code much more readable. In some places there's a sightly more complicated: #if DEBUG if (condition) printf(...); #endif which can be solved by adding a new macro, for example "cdebug" (c for conditional): #if DEBUG #else #endif And just writing: cdebug(condition, ...); If you are willing to accept a patch that implement this, I'm willing to do it. And please, can you please, please consider on putting the frontend on a SCM? (git would be great, dsource's svn is ok :). Thanks! -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Fitter, happier, more productive, comfortable, not drinking too much, regular exercise at the gym (3 days a week), getting on better with your associate employee contemporaries,
Feb 23 2008
Leandro Lucarella wrote:[...]If it helps at all (it probably doesn't...) there's a port of the entire front-end from C++ to Java in Descent: http://www.dsource.org/projects/descent/browser/trunk/descent.core/src/descent/internal/compiler/parser
Feb 23 2008
On 24/02/2008, Leandro Lucarella <llucax gmail.com> wrote:This is really annoying and can easily be changed for something like: #if DEBUG #else #endif (I know macros with variable arguments are just in C99, but I think most compilers has a vendor-specific way of doing it)You can do it without varags. #if DEBUG #else #endif So long as you're prepared to call it like this: dprintf(("Error on line %d",n)); My favorite C trick, though, was always: #ifdef DEBUG #else #endif Then you do debug printf(whatever); which resolves to printf(whatever); in debug mode, but to // printf(whatever); in release mode. Now "debug" works almost like in D. Yes, I know, technically C doesn't support // comments, but I've never yet encountered a compiler that doesn't understand them. (I still have to write C sometimes, professionally). I don't care what language the D compiler is written in, as long as it works. (Although now that D1 is stable, it would be quite cool to rewrite it in that).
Feb 24 2008
Janice Caron, el 24 de febrero a las 08:52 me escribiste:On 24/02/2008, Leandro Lucarella <llucax gmail.com> wrote:Yes, but that's a little more uglier and error prone, so if DMC supports varargs (I can't test it because I don't have Windows, and I can't find a DMC download for Linux), I'll defenetly go with varargs.This is really annoying and can easily be changed for something like: #if DEBUG #else #endif (I know macros with variable arguments are just in C99, but I think most compilers has a vendor-specific way of doing it)You can do it without varags. #if DEBUG #else #endif So long as you're prepared to call it like this: dprintf(("Error on line %d",n));My favorite C trick, though, was always: #ifdef DEBUG #else #endif Then you do debug printf(whatever); which resolves to printf(whatever); in debug mode, but to // printf(whatever);This is a clever trick but IMHO it's a little confusing too.in release mode. Now "debug" works almost like in D. Yes, I know, technically C doesn't support // comments, but I've never yet encountered a compiler that doesn't understand them.That's probably because // comments are valid C99 =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Sus descipulos se miraron, sin entender unos a otros y uno levantó su manito y le dijo: Peperino, Peperino, soy Antonito de capital: y tengo un salvavidas... a lo que Peperino, lo miró, lo tocó, lo frotó y lo sanó. Y todos dijeron: ehhh! Peperino se la come! Peperino se la come! -- Peperino Pómoro
Feb 24 2008
Leandro Lucarella wrote:This is a clever trick but IMHO it's a little confusing too.I've used those debug macros in various forms in other projects. Over time, I just gradually swung back to using the more straightforward #if method. This also has evolved into the 'debug' conditional compilation present in D.
Feb 24 2008
(I still have to write C sometimes, professionally).Nowt wrong with C :) especially back end stuff and the like, sadly C got its bad name from trying to be an all things to all people language and even today there is no such thing as a one language fits all as far as I know, but D comes pretty darned close :)I don't care what language the D compiler is written in, as long as it works. (Although now that D1 is stable, it would be quite cool to rewrite it in that).An interesting idea ;), and probably an excellent example of the power of D?
Feb 24 2008
"DBloke" <DBloke nowhere.org> wrote in message news:fps39f$1mfs$1 digitalmars.com...See Dil: http://code.google.com/p/dil/ It's already got the lexing and parsing done, as well as a better DDoc generator than the DMDFE. And it's written entirely in D1.(I still have to write C sometimes, professionally).Nowt wrong with C :) especially back end stuff and the like, sadly C got its bad name from trying to be an all things to all people language and even today there is no such thing as a one language fits all as far as I know, but D comes pretty darned close :)I don't care what language the D compiler is written in, as long as it works. (Although now that D1 is stable, it would be quite cool to rewrite it in that).An interesting idea ;), and probably an excellent example of the power of D?
Feb 24 2008
Jarrett Billingsley wrote:See Dil: http://code.google.com/p/dil/ It's already got the lexing and parsing done, as well as a better DDoc generator than the DMDFE. And it's written entirely in D1.alternatively see http://seatd.mainia.de :) which is D1, too lexing, parsing, semantics growing steadily
Feb 24 2008
See Dil: http://code.google.com/p/dil/ It's already got the lexing and parsing done, as well as a better DDoc generator than the DMDFE. And it's written entirely in D1.Looking good, D has some excellent programs out there but could really use a killer app to show off to the world.
Feb 24 2008
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.
Feb 26 2008
Walter Bright wrote:Leandro Lucarella wrote: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.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.
Feb 26 2008
Alexander Panek wrote:Walter Bright wrote: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. --bbLeandro Lucarella wrote: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.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.
Feb 26 2008
Walter Bright, el 26 de febrero a las 12:24 me escribiste:Leandro Lucarella wrote:It's not confusing to you! If you do it in a closed source project, it's perfectly fine but if you do it in an open source project, it's a bad thing (TM). You are putting a barrier to people to contribute (and making D look ugly). What are the chances that you rename them to a commonly used C++ extension? And what about the debug stuff. Are you willing to accept patcher or not? I'm just looking for a "yes" or "no". Please? Thank you. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- MP: Cómo está, estimado Bellini? B: Muy bien, Mario, oraculizando. MP: Qué tengo? B: El auto mal estacionado. MP: No, en mi mano, Bellini... B: Una murga! MP: No, escuche bien. Es de lona. B: Un ring, Mario. MP: No Bellini. Tiene cordones. B: La vereda. MP: No Bellini! Muy fácil, eh! Es B: Una modelo, Mario! imprescindible para jugar al B: Un negro, Mario. basquet. MP: No, Bellini, no y no! -- El Gran Bellini (Mario Podestá con unas zapatillas de basquet)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.
Feb 27 2008
Leandro Lucarella wrote:Walter Bright, el 26 de febrero a las 12:24 me escribiste:Additionally, some IDEs decide what compiler to use based on the filename extension and will automatically try to use a C compiler instead of a C++ one if the filename is .c. It doesn't matter for headers to be called .h since they're not directly compiled. (Even with pre-compiled headers you pre-compile them by #including them all in a single source file). Also editors often decide on what syntax highlighting mode to use based on the extension. So it's not just about people getting confused. --bbLeandro Lucarella wrote:It's not confusing to you! If you do it in a closed source project, it's perfectly fine but if you do it in an open source project, it's a bad thing (TM). You are putting a barrier to people to contribute (and making D look ugly). What are the chances that you rename them to a commonly used C++ extension? And what about the debug stuff. Are you willing to accept patcher or not? I'm just looking for a "yes" or "no". Please? Thank you.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.
Feb 27 2008
Leandro Lucarella wrote:.c is a commonly used C++ extension, but I understand your point. I'd also rather not change it, as it's an admittedly personal preference.It's not confusing to me because I never mix C and C++ source files in the same project.It's not confusing to you! If you do it in a closed source project, it's perfectly fine but if you do it in an open source project, it's a bad thing (TM). You are putting a barrier to people to contribute (and making D look ugly). What are the chances that you rename them to a commonly used C++ extension?And what about the debug stuff. Are you willing to accept patcher or not? I'm just looking for a "yes" or "no". Please?Not for just altering the debug print statements, again, it's a personal preference.
Feb 27 2008
Walter Bright wrote:Leandro Lucarella 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.c is a commonly used C++ extension, but I understand your point. I'd also rather not change it, as it's an admittedly personal preference.It's not confusing to me because I never mix C and C++ source files in the same project.It's not confusing to you! If you do it in a closed source project, it's perfectly fine but if you do it in an open source project, it's a bad thing (TM). You are putting a barrier to people to contribute (and making D look ugly). What are the chances that you rename them to a commonly used C++ extension?
Feb 27 2008
Bill Baxter wrote:Walter Bright wrote:When I took my first class that introduced C and C++ programming, the professor said that ".c" was the only standardized extension for C++ files, and that ".cpp",".cc", and ".cxx" were nonstandard and shouldn't be used.Leandro Lucarella 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.c is a commonly used C++ extension, but I understand your point. I'd also rather not change it, as it's an admittedly personal preference.It's not confusing to me because I never mix C and C++ source files in the same project.It's not confusing to you! If you do it in a closed source project, it's perfectly fine but if you do it in an open source project, it's a bad thing (TM). You are putting a barrier to people to contribute (and making D look ugly). What are the chances that you rename them to a commonly used C++ extension?
Feb 27 2008
Robert Fraser wrote:Bill Baxter wrote:Weird. I mean I don't even think Stroustrup's own book on his own language uses .c as the extension, so how could it be the "only standardized extension"? --bbWalter Bright wrote:When I took my first class that introduced C and C++ programming, the professor said that ".c" was the only standardized extension for C++ files, and that ".cpp",".cc", and ".cxx" were nonstandard and shouldn't be used.Leandro Lucarella 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.c is a commonly used C++ extension, but I understand your point. I'd also rather not change it, as it's an admittedly personal preference.It's not confusing to me because I never mix C and C++ source files in the same project.It's not confusing to you! If you do it in a closed source project, it's perfectly fine but if you do it in an open source project, it's a bad thing (TM). You are putting a barrier to people to contribute (and making D look ugly). What are the chances that you rename them to a commonly used C++ extension?
Feb 27 2008
Bill Baxter wrote:Weird. I mean I don't even think Stroustrup's own book on his own language uses .c as the extension, so how could it be the "only standardized extension"?You motivated me to look! On page 28 of Stroustrup's "The C++ Programming Language" Special Edition 2.4.1: "The user code goes in a third file, say user.c."
Feb 27 2008
Walter Bright wrote:Bill Baxter wrote:Well I'll be darned. I looked for my copy around here before I posted but couldn't find it. --bbWeird. I mean I don't even think Stroustrup's own book on his own language uses .c as the extension, so how could it be the "only standardized extension"?You motivated me to look! On page 28 of Stroustrup's "The C++ Programming Language" Special Edition 2.4.1: "The user code goes in a third file, say user.c."
Feb 27 2008
== Quote from Robert Fraser (fraserofthenight gmail.com)'s articleWhen I took my first class that introduced C and C++ programming, the professor said that ".c" was the only standardized extension for C++ files, and that ".cpp",".cc", and ".cxx" were nonstandard and shouldn't be used.I believe ".cpp" historically represented C pre-processor files, in fact. Sean
Feb 28 2008
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.All I can say is, I have. That's why dmc has a switch to treat .c files as C++ source, and it has had that switch pretty much from the beginning (20 years ago), from long before I gave up on using .cpp.Calling it "commonly used" is a stretch.C++, from day 1, never standardized on an extension. If it had, this discussion would be moot.
Feb 27 2008
Walter Bright wrote:Bill Baxter wrote:My experience only goes back to 10 years. It makes some sense that people would be using .c back at the very beginnings of C++. Especially given that Stroustrup didn't specify what the extension should be, and from what I understand he started out just with the intention of making C easier to use by adding classes. The initial implementations were just fancy preprocessors that generated C code, so it makes sense that the extension then would still be .c. They don't call Qt source code files .qt just because you have to run that moc preprocessor on them, after all.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.All I can say is, I have. That's why dmc has a switch to treat .c files as C++ source, and it has had that switch pretty much from the beginning (20 years ago), from long before I gave up on using .cpp.Indeed. Could have saved a lot of headaches over the years if there had been one. .cpp is my personal favorite. :-) --bbCalling it "commonly used" is a stretch.C++, from day 1, never standardized on an extension. If it had, this discussion would be moot.
Feb 27 2008
Walter Bright:C++, from day 1, never standardized on an extension. If it had, this discussion would be moot.I think today ".c++" and "cpp" are rather a de facto standard... And all my editors and IDEs recognize them as C++ sources. Where I work the personal preferences are things like the colors to show on screen used by the syntax highlighting, but not the file extensions to use. Bye, bearophile
Feb 28 2008
On Thu, Feb 28, 2008 at 10:29 AM, bearophile <bearophileHUGS lycos.com> wrote:I think today ".c++" and "cpp" are rather a de facto standard...I don't think I've ever seen ".c++" used. "cpp" and "cc" however seem quite common. Anders
Feb 28 2008
Anders Bergh wrote:On Thu, Feb 28, 2008 at 10:29 AM, bearophile <bearophileHUGS lycos.com> wrote:".c++" sounds like it might be painful for certain file systems.I think today ".c++" and "cpp" are rather a de facto standard...I don't think I've ever seen ".c++" used. "cpp" and "cc" however seem quite common. Anders
Feb 28 2008
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. --bbNot 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. -- Julio César Carrascal Urquijo http://jcesar.artelogico.com/
Feb 28 2008
Julio César Carrascal Urquijo wrote:Bill Baxter wrote: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. There's another one that's a SWIG-generated wrapper that looks like it's meant to be able to compile as either C or C++. It would be quite surprising if Mozilla contained lots of C++ files named .c, since their own portability guide says this: http://developer.mozilla.org/en/docs/C%2B%2B_Portability_Guide#C.2B.2B_filename_extension_is_.cpp The hit in Xerces appears to be a real C++ file using .c. However it seems to be an anomoly. If you go look at the full source tree, you find that it's the only one. http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/ All the other files in that dir are using .cpp or .hpp The STLport code is a good real example, though. Big high-profile project, and the latest source tree has a slew of C++ files called .c. http://stlport.cvs.sourceforge.net/stlport/STLport/stlport/stl/ HOWEVER, those are all nothing but templates. You have to #include them (or rather they get #included for you via some chain of #includes when you say #include <vector>). So really what they are is header files with a .c extension. There's not really a problem with naming header files whatever you want to name them, since compilers don't have to guess what type they are. Other, non-header C++ files in the STL tree seem to be named .cpp. --bbYou 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. --bbNot 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.
Feb 28 2008
Bill Baxter, el 29 de febrero a las 06:56 me escribiste:Julio César Carrascal Urquijo wrote: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 TVBill Baxter wrote: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.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. --bbNot 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.
Feb 29 2008
Leandro Lucarella wrote:Bill Baxter, el 29 de febrero a las 06:56 me escribiste:Most of those appear to be capital-C not lower-case c. That's a reasonable choice for people who care only about Unix-y file systems. --bbJulio César Carrascal Urquijo wrote:This is a more accurate search: "lang:c++ file:\.c$" It throw 334,000 results.Bill Baxter wrote: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.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. --bbNot 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.
Feb 29 2008