1. 18
  1.  

  2. 4

    Beware, the article is written in an explicit KJV jargon :)

    Regarding Rule 9:

    Thy external identifiers shall be unique in the first six characters

    Did ancient C compilers consider only the first 6 characters being significant?

    1. 9

      Ancient linkers sometimes only treated the first 6 characters as significant. A hangover from Fortran usage.

      1. 3

        Oh. OH! That’s why it says externally visible identifiers, haha! statics would normally not be the linker’s problem. :)

      2. 6

        Beware, the article is written in an explicit KJV jargon

        Bah, I prefer my subliterate parodies regarding programming to be in the original Aramaic.

        1. 3

          And written on parchment…

          1. 3

            Excuse me, papyrus is the only acceptable substrate for documentation

          2. 2

            For a parody of the Ten Commandments, don’t you mean Hebrew?

            I found the faux KJV pretty grating. Even skimming the headings, I don’t think I got past number 5.

            1. 1

              You’re correct, this is what I get for my unresearched quips.

        2. 3

          Cast all function arguments??? No way, that is surely not a good idea. The type passed should match, taking care of conversion, but just casting all of them is asking for unmaintainability and weird range errors. Somehow the text reads outdated. VAX? 386? 32bit? Library not declaring return values????? o_O

          1. 1

            It’s surely outdated, but not as much as one might wish. A lot of this was still relevant well into the mid 2000’s… you may not need to write code that accomodated such things, but you would certainly encounter code written with it in mind in the wild. You still can, if you look in the right places; there’s a lot of it.

            C99 sort of unintentionally stands as a quiet but firm symbolic barrier separating us lucky souls from such horrors of the past.

            1. 1

              Can you say more about this? I’m curious, and what did C99 add that made this practice unnecessary?

              1. 1

                The way I meant it, it is more symbolic. If you’re writing C99, then you are acknowledging that your code will not work on SunOS 3 or a VAX or such and that you’re OK with it. You’re no longer trying to appease Old Testament compilers or libc’s that, for instance, don’t actually declare the prototypes of standard functions. This may just be my own take though.

                1. 1

                  Oh, okay. That makes sense. I was genuinely asking. I’ve written very little C89 in my day, and no amount of C that came before that. (My first copy of K&R was the second edition.)