Path: utzoo!mnetor!uunet!grand!day From: day@grand.UUCP (Dave Yost) Newsgroups: comp.lang.c++ Subject: Re: C++ source file names Message-ID: <396@grand.UUCP> Date: 20 Dec 87 21:29:47 GMT References: <593@inria.UUCP> Reply-To: day@grand.UUCP (Dave Yost) Organization: Grand Software, Inc., Los Angels, CA 213-650-1089 Lines: 46 Keywords: .C versus .c Summary: Use .cxx or some other case-insensitive convention In article <593@inria.UUCP> shapiro@inria.UUCP (Marc Shapiro) writes: > >There is a proposal (by the FSF people) to use the .C (capital C) extension >to name C++ source files, instead of .c. This should make a few things more >efficient (e.g. choosing editor modes) and would allow to mix C and C++ >sources in a non-confusing way. > >I think the idea is perfectly reasonable, if ATT adopts it. The distributed >CC could be prepared to accept either .c or .C in order not to break any >exisiting programs, but future programs should only use the .C extension. > >What do you think? Since one of the primary goals of C++ is to become a serious, widely-used language, it seems to me that choosing a naming convention that will not work on most computers in the world is not a good idea. Something that will work on systems without filename case sensitivity would be more appropriate. The Glockenspiel people use ".cxx" as the C++ suffix in their cfront-derived product, which has been ported to at least 20 environments, including DOS and OS/2, and probably represents the largest installed base of C++ compilers. Think of the "xx" as "++" rotated 45 degrees. Existing UNIX C compilers will do the appropriate thing with files ending in .o, .s, and .c. The Glockenspiel compiler driver respects that convention and extends it by treating .cxx files as C++. I think this makes much more sense than a compiler driver that treats both .c and .cxx files as C++ source. I hope the that either the .cxx convention, or .cc, or something new and creative will be adopted by the next release of cfront, and that .c files will go on being C source files. Now is the time to do this right, even though it may annoy present C++ users. Their annoyance avoided now will be dwarfed by the pain of 50 times more future users. (As in most cases in the sorry history of computers.) --dave yost P.S. Who are the FSF people?