SGI had it right a decade ago!

Discussion in 'C++' started by Steven T. Hatton, Sep 12, 2004.

  1. 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.
    Steven T. Hatton, Sep 12, 2004
    #1
    1. Advertising

  2. Steven T. Hatton

    Greg Comeau Guest

    In article <>,
    Steven T. Hatton <> 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?
    Greg Comeau, Sep 12, 2004
    #2
    1. Advertising

  3. "Steven T. Hatton" <> wrote in message
    news:...
    > 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
    Aguilar, James, Sep 12, 2004
    #3
  4. Steven T. Hatton

    Jeff Flinn Guest

    "Steven T. Hatton" <> wrote in message
    news:...
    > 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
    Jeff Flinn, Sep 12, 2004
    #4
  5. "Steven T. Hatton" <> 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
    Jonathan Turkanis, Sep 12, 2004
    #5
  6. Steven T. Hatton

    Howard Guest

    "Steven T. Hatton" <> wrote in message
    news:...
    > 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
    Howard, Sep 13, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl Prothman [MVP]

    Re: format dateTime '06/08/2003 12:00' to '1 day ago'

    Carl Prothman [MVP], Aug 7, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    4,800
    Cindy Meister -WordMVP-
    Aug 16, 2003
  2. Dan Ignatov
    Replies:
    0
    Views:
    1,424
    Dan Ignatov
    Aug 11, 2003
  3. Derek Basch
    Replies:
    8
    Views:
    409
    Fredrik Lundh
    Feb 28, 2006
  4. Xah Lee
    Replies:
    16
    Views:
    299
    Albert van der Horst
    Mar 12, 2012
  5. Xah Lee
    Replies:
    15
    Views:
    710
    Albert van der Horst
    Mar 12, 2012
Loading...

Share This Page