• nothacking@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    Hot take, C is better then C++. It really just has one unique footgun, pointers, which can be avoided most of the time. C++ has lots of (smart)pointer related footguns, each with their own rules.

    • MajorHavoc@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      Yeah. My journey of love, loathing, hatred, adoration, and mild appreciation for C++, ended with the realization that 90% of the time I can get the job done in C with little hassle, and a consistent, predictable, trustworthy set of unholy abominations.

    • Valmond@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      If you do C, and avoid pointers, do tell me what the point is using the language at all?

      I mean if memory management is “the only way to shoot yourself in the foot” in C, then thats a quite big part of the language!

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

        If you do C, and avoid pointers, do tell me what the point is using the language at all?

        Person is saying that C has one big footgun, while C++ has armory of them

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

      Preach brother, I don’t think that’s a hot take at all. I’ve become almost twice as productive since moving from c++ to c. I think I made the change when I was looking into virtual destructors and I was thinking, “at what point am I solving a problem the language is creating?” Another good example of this is move semantics. It’s only a solution to a problem the language invented.

      My hot take: The general fear of pointers needs to die.