Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   SGI had it right a decade ago! (http://www.velocityreviews.com/forums/t285564-sgi-had-it-right-a-decade-ago.html)

Steven T. Hatton 09-12-2004 02:25 PM

SGI had it right a decade ago!
 
I'm reading through the Inventor Mentor for SGI's Open Inventor (C++ OpenGL
binding). I just noticed they named their example file "Molecule.c++".
This choice is so obvious and rational to me that I felt it wasn't even
worth discussing. The only reason I haven't used the .c++ extention is
that no one else seems to use it, and my tools don't recognize it. But now
I see that SGI was doing it ten years ago. Why didn't this become the
"standard"? ".c" means a C source file to both me, and my tools. I've
noticed this is what Stroustrup uses on his website - much to my surprize.
".cpp" is quite common, and is used by both Trolltech and KDevelop. To me,
"cpp" means the C preprocessor, so that convention seems wrong. Koenig and
Moo use ".cc" which is the most agreeable convention I've seen in common
use. But ".c++" is superior to all of these!
--
"[M]y dislike for the preprocessor is well known. Cpp is essential in C
programming, and still important in conventional C++ implementations, but
it is a hack, and so are most of the techniques that rely on it. ...I think
the time has come to be serious about macro-free C++ programming." - B. S.


Greg Comeau 09-12-2004 03:00 PM

Re: SGI had it right a decade ago!
 
In article <E4idnTel9NEZwdncRVn-tw@speakeasy.net>,
Steven T. Hatton <susudata@setidava.kushan.aa> wrote:
>I'm reading through the Inventor Mentor for SGI's Open Inventor (C++ OpenGL
>binding). I just noticed they named their example file "Molecule.c++".
>This choice is so obvious and rational to me that I felt it wasn't even
>worth discussing. The only reason I haven't used the .c++ extention is
>that no one else seems to use it, and my tools don't recognize it. But now
>I see that SGI was doing it ten years ago. Why didn't this become the
>"standard"? ".c" means a C source file to both me, and my tools. I've
>noticed this is what Stroustrup uses on his website - much to my surprize.
>".cpp" is quite common, and is used by both Trolltech and KDevelop. To me,
>"cpp" means the C preprocessor, so that convention seems wrong. Koenig and
>Moo use ".cc" which is the most agreeable convention I've seen in common
>use. But ".c++" is superior to all of these!


Comeau C++ accepts .c++ on some platforms. On others it does not,
in some cases because the OS doesn't allow +'s in filenames, which
is why Standard C++ is generally silent on file names (even header
file names used need not literally be those names on your filesystem,
or even be on a filesystem).
--
Greg Comeau / Comeau C++ 4.3.3, for C++03 core language support
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

Aguilar, James 09-12-2004 06:41 PM

Re: SGI had it right a decade ago!
 

"Steven T. Hatton" <susudata@setidava.kushan.aa> wrote in message
news:E4idnTel9NEZwdncRVn-tw@speakeasy.net...
> I'm reading through the Inventor Mentor for SGI's Open Inventor (C++
> OpenGL
> binding). I just noticed they named their example file "Molecule.c++".
> This choice is so obvious and rational to me that I felt it wasn't even
> worth discussing. The only reason I haven't used the .c++ extention is
> that no one else seems to use it, and my tools don't recognize it. But
> now
> I see that SGI was doing it ten years ago. Why didn't this become the
> "standard"? ".c" means a C source file to both me, and my tools. I've
> noticed this is what Stroustrup uses on his website - much to my surprize.
> ".cpp" is quite common, and is used by both Trolltech and KDevelop. To
> me,
> "cpp" means the C preprocessor, so that convention seems wrong. Koenig
> and
> Moo use ".cc" which is the most agreeable convention I've seen in common
> use. But ".c++" is superior to all of these!


I use ".txt" as my normal C++ source file extension.

What I just said was a lie (I don't), but it would work, and the point I'm
trying to make is that it really doesn't matter as long as you can others
can identify what the file is for.

James



Jeff Flinn 09-12-2004 06:52 PM

Re: SGI had it right a decade ago!
 

"Steven T. Hatton" <susudata@setidava.kushan.aa> wrote in message
news:E4idnTel9NEZwdncRVn-tw@speakeasy.net...
> I'm reading through the Inventor Mentor for SGI's Open Inventor (C++

OpenGL
> binding). I just noticed they named their example file "Molecule.c++".
> This choice is so obvious and rational to me that I felt it wasn't even
> worth discussing. The only reason I haven't used the .c++ extention is
> that no one else seems to use it, and my tools don't recognize it. But

now

I would bet they are configurable, at least I do know MSVC is for
recognizing ".cxx" and ".ipp". Although the '++' may screw up some command
line parsers.

> I see that SGI was doing it ten years ago. Why didn't this become the
> "standard"? ".c" means a C source file to both me, and my tools. I've
> noticed this is what Stroustrup uses on his website - much to my surprize.
> ".cpp" is quite common, and is used by both Trolltech and KDevelop. To

me,
> "cpp" means the C preprocessor, so that convention seems wrong. Koenig

and

I think there are drugs to help control these obsessive/compulsive
tendencies. ;^)

Jeff F



Jonathan Turkanis 09-12-2004 09:27 PM

Re: SGI had it right a decade ago!
 

"Steven T. Hatton" <susudata@setidava.kushan.aa> wrote in message:

> "cpp" means the C preprocessor, so that convention seems wrong. Koenig and
> Moo use ".cc" which is the most agreeable convention I've seen in common
> use. But ".c++" is superior to all of these!


I've found that whatever system is used for the free web space provided by my
ISP doesn't allow ++ in file names. This has already caused me no end of
trouble, even though only a single file is involved: 'c++boost.gif'.

So I hope the convention doesn't change any time soon ;-)

Jonathan



Howard 09-13-2004 04:57 PM

Re: SGI had it right a decade ago!
 

"Steven T. Hatton" <susudata@setidava.kushan.aa> wrote in message
news:E4idnTel9NEZwdncRVn-tw@speakeasy.net...
> I'm reading through the Inventor Mentor for SGI's Open Inventor (C++

OpenGL
> binding). I just noticed they named their example file "Molecule.c++".
> This choice is so obvious and rational to me that I felt it wasn't even
> worth discussing. The only reason I haven't used the .c++ extention is
> that no one else seems to use it, and my tools don't recognize it. But

now
> I see that SGI was doing it ten years ago. Why didn't this become the
> "standard"? ".c" means a C source file to both me, and my tools. I've
> noticed this is what Stroustrup uses on his website - much to my surprize.
> ".cpp" is quite common, and is used by both Trolltech and KDevelop. To

me,
> "cpp" means the C preprocessor, so that convention seems wrong. Koenig

and
> Moo use ".cc" which is the most agreeable convention I've seen in common
> use. But ".c++" is superior to all of these!


What difference does it make? There is no requirement made in the standard
for any extension. Use whatever you want and works well for you. I'll use
whatever I want and works well for me. (Are you sure that ".c++" is even
valid on all platforms?)

-Howard





All times are GMT. The time now is 04:34 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57