• addie@feddit.uk
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      2 年前

      True. Although given how easy it is to cast void pointers to the wrong damn thing, it would be nice if you did, makes refactoring much easier. Makes me appreciate std::any all the more.

      • embed_me
        link
        fedilink
        arrow-up
        3
        ·
        2 年前

        Void pointer should be avoided anyways. Even I find them rare and I mostly work in embedded RTOS

    • Subverb@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      2 年前

      This isn’t malloc though. I have to assume the cast is because the user has experience with the output from an LLM being untrustworthy.