🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1458

Re: RESULTS: C++ file extension survey

#1458
From: Scott Meyers
Date: Tue, 12 Jan 1993 15:30
32 lines
2274 bytes
In article <1569@nazgul.UUCP> bright@nazgul.UUCP (Walter Bright) writes:
| In article <1993Jan7.182757.8297@wam.umd.edu> krc@wam.umd.edu (Kevin R. Coombes) writes:
| /It would be really nice if everybody
| /agreed on some common extension; I'm tired of wrting batch files to
| /rename things, and shell scripts to build symbolic links when I switch
| /from one platform to the other.
| 
| Zortech C++ will recognize .cpp, .cxx, .cc and .c++ all as valid C++
| filename extensions, though our examples all use .cpp.

I have never been able to fathom why any compiler *cares* what file
extension is used.  If I want to call my C++ source file foo.bar.baz, why
should the compiler give two hoots?  Certainly my text editor, my document
editor, my mail-reading program, etc., is happy to read/write whatever
files I tell it to.  Why do compilers insist on being so fascist?

Many compilers can actually parse more than one language (e.g., K&R C, ANSI
C, C++, Objective C), and they use the extension of the source file to
determine which parser to use, but certainly there is no reason why they
can't have a default mode and a command-line switch to tell them which
parser to use in the event that a non-standard extension is used.  Last I
looked, gcc did this.  Similarly, the command cc, CC, gcc, g++, etc., is
often more than a compiler, also invoking an assember, loader, etc.,
depending on what is passed in as an argument.  Still, there is no reason
why such tools shouldn't take arbitrary file names as long as there are
command line options to direct the behavior of the tool for nonstandard
extensions (or to override default behavior).

Scott

-------------------------------------------------------------------------------
What do you say to a convicted felon in Providence?  "Hello, Mr. Mayor."
Technical Details
Message-ID: <1993Jan12.153045.15612@cs.brown.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!brunix!sdm
References: <1if5q2INN8pj@tsavo.hks.com> <1993Jan7.182757.8297@wam.umd.edu> <1569@nazgul.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!brunix!brunix!sdm
From: sdm@cs.brown.edu (Scott Meyers)
Subject: Re: RESULTS: C++ file extension survey
Message-ID: <1993Jan12.153045.15612@cs.brown.edu>
Sender: news@cs.brown.edu
Organization: Brown University Department of Computer Science
References: <1if5q2INN8pj@tsavo.hks.com> <1993Jan7.182757.8297@wam.umd.edu> <1569@nazgul.UUCP>
Date: Tue, 12 Jan 1993 15:30:45 GMT
Lines: 32