Path: utzoo!mnetor!uunet!husc6!purdue!decwrl!megatest!djones
From: djones@megatest.UUCP (Dave Jones)
Newsgroups: comp.lang.c++
Subject: Re: C++ file name extensions
Message-ID: <519@goofy.megatest.UUCP>
Date: 6 May 88 22:24:00 GMT
References: <2757@calmasd.GE.COM>
Organization: Megatest Corporation, San Jose, Ca
Lines: 48

in article <2757@calmasd.GE.COM>, pal@calmasd.GE.COM (Peter Lawrence) says:
> 
> 
> Someone asked recently: what should C++ file name extension be?
> 
> How about using the same extensions as C.

  Some of your questions have been answered here already.

  Utilities such as "make" and editors such as "emacs" want to know
  the form of a file from inspecting its name.  I name my files
  foo.C and foo.H, and emacs does auto-indenting which works for 
  classes, etc.

> The intention of Bjourn Stroustroup
> as stated in the beginning of his book is that the C++ language is fully
> upward compatable with C.

  Hmm.  I haven't got the book handy right now, but did he say just 
  that?  C++ is not a superset of C.  The way function prototypes are
  done is essentially different.  And C and C++ have different name-spaces.
  So C++ is not upward compatible with C.

> Users should be replacing their C compilers with
> C++ compilers. This may not be happening immediately because of various
> temporary difficulties but it is obviously the direction of the future.
> Implementors should not be locking users into maintaining two compilers and
> their associated intricacies with 'make' etc. when one compiler will do.
> 

  Users should not be changing things that work.  If the program is
  written in C and it works, don't fix it.  The customer will not be
  impressed with your reasoning when you try to tell him why you
  switched to a new compiler, when the old one was doing just fine.

  So far as new work goes, yes I would prefer to do it in C++ rather
  than C, but some things have to be ported to lots of different machines.
  I can't afford to go into the porting-C++ business.

> ...

  From the comments I have seen on the net, foo.cc and foo.hh seem to
  be pretty good choices for suffixes.




		- Dave Jones