home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / std / cplus / 2033 < prev    next >
Encoding:
Text File  |  1993-01-12  |  2.2 KB  |  44 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!brunix!brunix!sdm
  3. From: sdm@cs.brown.edu (Scott Meyers)
  4. Subject: Re: RESULTS: C++ file extension survey
  5. Message-ID: <1993Jan12.153045.15612@cs.brown.edu>
  6. Sender: news@cs.brown.edu
  7. Organization: Brown University Department of Computer Science
  8. References: <1if5q2INN8pj@tsavo.hks.com> <1993Jan7.182757.8297@wam.umd.edu> <1569@nazgul.UUCP>
  9. Date: Tue, 12 Jan 1993 15:30:45 GMT
  10. Lines: 32
  11.  
  12. In article <1569@nazgul.UUCP> bright@nazgul.UUCP (Walter Bright) writes:
  13. | In article <1993Jan7.182757.8297@wam.umd.edu> krc@wam.umd.edu (Kevin R. Coombes) writes:
  14. | /It would be really nice if everybody
  15. | /agreed on some common extension; I'm tired of wrting batch files to
  16. | /rename things, and shell scripts to build symbolic links when I switch
  17. | /from one platform to the other.
  18. | Zortech C++ will recognize .cpp, .cxx, .cc and .c++ all as valid C++
  19. | filename extensions, though our examples all use .cpp.
  20.  
  21. I have never been able to fathom why any compiler *cares* what file
  22. extension is used.  If I want to call my C++ source file foo.bar.baz, why
  23. should the compiler give two hoots?  Certainly my text editor, my document
  24. editor, my mail-reading program, etc., is happy to read/write whatever
  25. files I tell it to.  Why do compilers insist on being so fascist?
  26.  
  27. Many compilers can actually parse more than one language (e.g., K&R C, ANSI
  28. C, C++, Objective C), and they use the extension of the source file to
  29. determine which parser to use, but certainly there is no reason why they
  30. can't have a default mode and a command-line switch to tell them which
  31. parser to use in the event that a non-standard extension is used.  Last I
  32. looked, gcc did this.  Similarly, the command cc, CC, gcc, g++, etc., is
  33. often more than a compiler, also invoking an assember, loader, etc.,
  34. depending on what is passed in as an argument.  Still, there is no reason
  35. why such tools shouldn't take arbitrary file names as long as there are
  36. command line options to direct the behavior of the tool for nonstandard
  37. extensions (or to override default behavior).
  38.  
  39. Scott
  40.  
  41. -------------------------------------------------------------------------------
  42. What do you say to a convicted felon in Providence?  "Hello, Mr. Mayor."
  43.