• Warl0k3@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    arrow-down
    1
    ·
    4 months ago

    C++ is just the next iteration of C. C# is just another layer of iteration on top of C++. Flags are simple indicators for programs, usually set by a controlling human/system, semaphores are flags that communicate between processes.

    • Yaztromo@lemmy.world
      link
      fedilink
      English
      arrow-up
      20
      arrow-down
      2
      ·
      4 months ago

      C++ is just the next iteration of C.

      This is somewhat clever when you know that the ‘++’ operator is the post-increment operator in C.

      C# is just another layer of iteration on top of C++.

      …except there is no ‘#’ operator in C or C++, so any interesting self-referential pattern breaks down here. The ‘#’ comes from musical notation, where a ‘#’ (sharp) note is played a semitone higher — and was chosen more for marketing purposes rather than scientists having an inside joke.

      You could have also mentioned ‘D’, which is another “next iteration of C” independent of C++.

      • WeirdAlex03@lemmy.zip
        link
        fedilink
        English
        arrow-up
        21
        ·
        4 months ago

        The C programming language also descends from the B programming language (though B’s lineage unfortunately goes to BCPL, not A)

        • Swedneck@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 months ago

          pretty sure there’s a D language, and i know there’s R but that’s not super related, obviously.

          i’m just waiting for the ø programming language

          • captainlezbian@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            4 months ago

            R is a wonderful programming language in the eyes of people who are bad at programming. And that’s not disparaging it, it’s just used by scientists and engineers more than programmers because nothing makes an anova take less work

      • Auk@kbin.social
        link
        fedilink
        arrow-up
        15
        ·
        edit-2
        4 months ago

        except there is no ‘#’ operator in C or C++, so any interesting self-referential pattern breaks down here

        # is two layers of ++, so the pattern is there. Whether that was originally intended or coincidence is another matter, but it works well enough that I suspect it was considered when picking names.

        • Yaztromo@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          4 months ago

          That feels like a significant reach — and every online reference I was able to find only talks about using ‘#’ in the musical notation sense, hence why the name of the language is pronounced “C-sharp”.