Loading ...
Sorry, an error occurred while loading the content.

[boost] Re: Header files extention

Expand Messages
  • Nicolai Josuttis
    ... I hope not! Using .h as extension really results into a lot of trouble (as Valentin pointed out when he started this discussion). It has A LOT of
    Message 1 of 11 , Jun 1, 1999
    • 0 Attachment
      Beman Dawes wrote:
      > It looks like .cpp and .h are the most common file types.
      > Like-it-or-not they are the de facto standards.
      >
      I hope not!

      Using .h as extension really results into a lot of trouble
      (as Valentin pointed out when he started this discussion).
      It has A LOT of advantages to give C++ files a unique
      extension.
      I'll definitely stay with .hpp because
      - it is unique
      - it is consistent with .cpp
      - it is intuitive (unlike .hh)
      - it works case insensitive
      These are a lot of good reasons!
      And (even coming from UNIX) it seems for me that
      .hpp is a de-facto standard, too.

      Of course, we should not start a style war about this.
      However, using .h as extension really does not make any
      sense for me (except backward style compatibility perhaps).

      --
      Nicolai M. Josuttis
      Solutions in Time

      http://www.josuttis.de/
      mailto:solutions@...


      ------------------------------------------------------------------------

      eGroups.com home: http://www.egroups.com/group/boost
      http://www.egroups.com - Simplifying group communications
    • Beman Dawes
      ... Well, if Steinar Bang s survey is to be believed (and it certainly reflects my personal experience) .h at 55% looks a lot more common than .hpp at 6%. But
      Message 2 of 11 , Jun 1, 1999
      • 0 Attachment
        At 09:28 AM 6/1/99 +0200, Nicolai Josuttis wrote:

        >Beman Dawes wrote:
        >> It looks like .cpp and .h are the most common file types.
        >> Like-it-or-not they are the de facto standards.
        >>
        >I hope not!

        Well, if Steinar Bang's survey is to be believed (and it certainly
        reflects my personal experience) .h at 55% looks a lot more common
        than .hpp at 6%.

        But until we have more experience with boost, I will accept
        submissions with any reasonable file type.

        --Beman

        ------------------------------------------------------------------------

        eGroups.com home: http://www.egroups.com/group/boost
        http://www.egroups.com - Simplifying group communications
      • Nicolai Josuttis
        ... Did you ever try to write a Makefile for both C and C++ headers using the same extension? Forget it (at least regarding generic rules). Excuse me, but
        Message 3 of 11 , Jun 1, 1999
        • 0 Attachment
          Beman Dawes wrote:
          >
          > At 09:28 AM 6/1/99 +0200, Nicolai Josuttis wrote:
          >
          > >Beman Dawes wrote:
          > >> It looks like .cpp and .h are the most common file types.
          > >> Like-it-or-not they are the de facto standards.
          > >>
          > >I hope not!
          >
          > Well, if Steinar Bang's survey is to be believed (and it certainly
          > reflects my personal experience) .h at 55% looks a lot more common
          > than .hpp at 6%.
          >
          > But until we have more experience with boost, I will accept
          > submissions with any reasonable file type.
          >
          Did you ever try to write a Makefile for both C and C++ headers
          using the same extension?
          Forget it (at least regarding generic rules).
          Excuse me, but having the same extension for C and C++ files is REALLY a bad
          idea.
          However, I can live with your decision.

          --
          Nicolai M. Josuttis
          Solutions in Time

          http://www.josuttis.de/
          mailto:solutions@...

          ------------------------------------------------------------------------

          eGroups.com home: http://www.egroups.com/group/boost
          http://www.egroups.com - Simplifying group communications
        • Steinar Bang
          ... Hm... for the record, please note that 1. I personally wasn t too happy with the results, since it meant that I had to agree to drop .hh and .cc in favour
          Message 4 of 11 , Jun 2, 1999
          • 0 Attachment
            >>>>> Beman Dawes <beman@...>:

            > At 09:28 AM 6/1/99 +0200, Nicolai Josuttis wrote:
            >> Beman Dawes wrote:
            >>> It looks like .cpp and .h are the most common file types.
            >>> Like-it-or-not they are the de facto standards.

            >> I hope not!

            > Well, if Steinar Bang's survey is to be believed (and it certainly
            > reflects my personal experience) .h at 55% looks a lot more common
            > than .hpp at 6%.

            Hm... for the record, please note that
            1. I personally wasn't too happy with the results, since it meant
            that I had to agree to drop .hh and .cc in favour of .h and .cpp :-/
            2. The survey was done almost three years ago. Things may have
            changed since then

            During the discussions we had back then, someone mentioned that MSVC++
            had problems when using other extensions than .h and .cpp. What
            specific problems I don't know, and have never tried to get verified.

            ------------------------------------------------------------------------

            eGroups.com home: http://www.egroups.com/group/boost
            http://www.egroups.com - Simplifying group communications
          • Beman Dawes
            ... MSVC++ ... verified. I just tested a .hpp header from Nico Jusuttis with MSVC++ 6.0 and it worked without problems, and without doing any special setup
            Message 5 of 11 , Jun 2, 1999
            • 0 Attachment
              At 10:18 AM 6/2/99 +0200, Steinar Bang wrote:

              >During the discussions we had back then, someone mentioned that
              MSVC++
              >had problems when using other extensions than .h and .cpp. What
              >specific problems I don't know, and have never tried to get
              verified.

              I just tested a .hpp header from Nico Jusuttis with MSVC++ 6.0 and it
              worked without problems, and without doing any special setup
              whatsoever. So while that may have been a problem at one time, it
              doesn't seem to be an issue now.

              --Beman

              ------------------------------------------------------------------------

              eGroups.com home: http://www.egroups.com/group/boost
              http://www.egroups.com - Simplifying group communications
            Your message has been successfully submitted and would be delivered to recipients shortly.