• hark@lemmy.world
    link
    fedilink
    arrow-up
    88
    ·
    3 months ago

    The graph goes up for me when I find my comfortable little subset of C++ but goes back down when I encounter other people’s comfortable little subset of C++ or when I find/remember another footgun I didn’t know/forgot about.

    • LANIK2000@lemmy.world
      link
      fedilink
      arrow-up
      43
      ·
      edit-2
      3 months ago

      That’s one thing that always shocks me. You can have two people writing C++ and have them both not understand what the other is writing. C++ has soo many random and contradictory design patterns, that two people can literally use it as if it were 2 separate languages.

    • henfredemars@infosec.pub
      link
      fedilink
      English
      arrow-up
      34
      ·
      3 months ago

      When I became a team leader at my last job, my first priority was making a list of parts of the language we must never use because of our high reliability requirement.

      • hark@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        3 months ago

        C is almost the perfect subset for me, but then I miss templates (almost exclusively for defining generic data structures) and automatic cleanup. That’s why I’m so interested in Zig with its comptime and defer features.

        • jas0n@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          3 months ago

          You may also like Odin if you haven’t already started zig. It’s less of a learning curve and feels more like what c should have always been. It has defer and simple generics, but doesn’t have the magic of comptime.

      • uis@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        3 months ago

        Damm, C23 has a lot of changes. Some of them are really good, some of them I strongly dislike(keyword auto, addition of nullptr).