On the one side I really like c and c++ because they’re fun and have great performance; they don’t feel like your fighting the language and let me feel sort of creative in the way I do things(compared with something like Rust or Swift).

On the other hand, when weighing one’s feelings against the common good, I guess it’s not really a contest. Plus I suspect a lot of my annoyance with languages like rust stems from not being as familiar with the paradigm. What do you all think?

  • Adanisi@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    13
    ·
    edit-2
    7 months ago

    I’m going to advocate for C here: the sheer simplicity, fast compile times, and power it gives you means it’s not a bad language, even after all these years. Couple that with the fact that everything supports it.

    Rust, while I don’t actually know how to write it, seems much more difficult to learn, slower to compile, and if you want to do anything with memory, you have to fight the compiler.

    And memory bugs are only a subset of bugs that can be exploited in a program. Pretending Rust means no more exploitation is stupid.

    • Pipoca@lemmy.world
      link
      fedilink
      arrow-up
      10
      ·
      7 months ago

      And memory bugs are only a subset of bugs that can be exploited in a program. Pretending Rust means no more exploitation is stupid.

      This is facile.

      According to Microsoft, about 70% of security bugs they see are memory safety issues.

      Yes: if you introduce memory safety, there’s still those 30% of security bugs left. But, well, I’d rather worry about 30% of issues than 100%…

      Similarly, I use libraries that eliminate SQL injections unless you really go out of your way.

    • lolcatnip@reddthat.com
      link
      fedilink
      English
      arrow-up
      7
      ·
      7 months ago

      I’ve written quite a bit of Rust and a lot of C and C++ code. I’ll take Rust over C or C++ for any task, including ones where memory safety isn’t a concern. Yes, there’s a learning curve, but overall it’s just more pleasant to use. Now that I’m used to it, writing C++ code feels just as much like fighting the compiler as Rust ever did.

      • Adanisi@lemmy.zip
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        7 months ago

        The… programming community?

        I might adopt Rust, I have no hard feelings against it, I just like not fighting with the compiler and having the fastest execution possible.

        But hey, even Lemmy needs some hot takes to keep it lively.

    • crimsonpoodle@pawb.socialOP
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      Maybe it’s just because I haven’t had to deal with the scenario yet but does compile time really matter? I mean for small programs it seems it’s almost instant on modern machines and for large programs I would assume, if it exists, that you would be using the equivalent of make so you would only be recompiling the small changes made.

    • okamiueru@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      Zig is a pretty interesting alternative to C

      Pretending Rust means no more exploitation is stupid.

      I guess? Are you alluding to someone or something in particular?