For the love of grep

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerDiver
    Prophet
    • Mar 2008
    • 2820

    #16
    Originally posted by Pete Mack
    Mea culpa, mea maxima culpa. I create the original subdirectory (osx), and things got out of hand after that.

    Having two types.h files is a bad idea. Name the second one object_types.h. It's a lot simpler.
    Have none of you guys ever worked on a large project? Duplicated file names are to be expected. That's why different sections are in different directories. Any compiler incapable of dealing with the situation cannot be taken seriously.

    Comment

    • konijn_
      Hellband maintainer
      • Jul 2007
      • 367

      #17
      Originally posted by PowerDiver
      Have none of you guys ever worked on a large project? Duplicated file names are to be expected. That's why different sections are in different directories. Any compiler incapable of dealing with the situation cannot be taken seriously.
      <snip snide pissing contest remarks>Your condescending remark is out of place.

      Beyond that, I think you are wrong. A good coding standard would definitely discourage same file names, even in different folders. Especially in a language that does not support namespaces.

      T.
      * Are you ready for something else ? Hellband 0.8.8 is out! *

      Comment

      • PowerDiver
        Prophet
        • Mar 2008
        • 2820

        #18
        Originally posted by konijn_
        <snip snide pissing contest remarks>Your condescending remark is out of place.

        Beyond that, I think you are wrong. A good coding standard would definitely discourage same file names, even in different folders. Especially in a language that does not support namespaces.

        T.
        I didn't mean to be condescending, though of course I was. I am just boggled. Flabbergasted. Etc. Repeated filenames in different directories is common practice for many good coders who take their coding standards very seriously.

        The most universally accessible C project I can think of is the linux kernel. On my machine there appear to be 33 instances of "types.h" in the kernel. That's the filename that I assume started this thread.

        locate "/types.h" | grep /usr/src/linux | wc
        33 33 1653

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9634

          #19
          Originally posted by Pete Mack
          Mea culpa, mea maxima culpa. I create the original subdirectory (osx), and things got out of hand after that.
          Call me a fence-sitter (or anything else you like), but I actually like port-specific files in their own directories and everything else in src.

          Also, I'm with UnAndrew on the not splitting up.

          (goes away to continue adding ID-by-use code to dungeon.c)
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #20
            Originally posted by Nick
            (goes away to continue adding ID-by-use code to dungeon.c)
            *shudders*
            takkaria whispers something about options. -more-

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #21
              Originally posted by Nick
              Call me a fence-sitter (or anything else you like), but I actually like port-specific files in their own directories and everything else in src.
              actually, I agree with you. Angband is only marginally big enough for multiple subdirectories, but the OS- and GFX- specific stuff is a distraction. Especially osx, which requires rather a lot of files to do right.
              (goes away to continue adding ID-by-use code to dungeon.c)
              LOLZ

              Comment

              • konijn_
                Hellband maintainer
                • Jul 2007
                • 367

                #22
                Originally posted by Pete Mack
                actually, I agree with you. Angband is only marginally big enough for multiple subdirectories, but the OS- and GFX- specific stuff is a distraction. Especially osx, which requires rather a lot of files to do right.
                Yes, I do believe it is fine for os specific stuff, I do the same.
                Still googling the types.h phenomena for linux which I didnt know about, so far it seems to give more head aches than benefits

                T.
                * Are you ready for something else ? Hellband 0.8.8 is out! *

                Comment

                Working...
                😀
                😂
                🥰
                😘
                🤢
                😎
                😞
                😡
                👍
                👎