• TechNom (nobody)@programming.dev
      link
      fedilink
      English
      arrow-up
      13
      ·
      edit-2
      8 months ago

      That’s misinformation. There’s no overestimation. The problem is so bad that even the US government advocates the use of memory safe languages (including GC languages).

      I have used C and C++. You need laser sharp focus to avoid memory safety errors even after you learn what causes them and how to avoid them. It’s significantly easier to write programs in Rust because any lapse in care to avoid memory safety bugs are caught by the compiler.

      • magic_lobster_party@kbin.run
        link
        fedilink
        arrow-up
        1
        arrow-down
        2
        ·
        8 months ago

        What I mean is that even if you use GC languages like Java or Go you will still encounter annoying bugs. I’m not saying that memory safety isn’t important.

        • TechNom (nobody)@programming.dev
          link
          fedilink
          English
          arrow-up
          6
          ·
          8 months ago

          You said bugs caused by ‘memory problems’. And that Rust programmers vastly overestimate them. Those aren’t generic logical bugs that you get in Go or Java. And Rust never claimed to solve logical bugs.

          • magic_lobster_party@kbin.run
            link
            fedilink
            arrow-up
            1
            ·
            8 months ago

            I’m more poking fun at Rust enthusiasts who make it seem like programs are automatically bug free just because they’re written in Rust.

            Haskell enthusiasts made similar claims as well.

    • CanadaPlus@lemmy.sdf.org
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      I don’t know, I’ve caused a whole lot in C/C++. I haven’t actually written anything in Rust either, so I’m somewhat unbiased.

    • MajorHavoc@programming.dev
      link
      fedilink
      arrow-up
      6
      arrow-down
      6
      ·
      edit-2
      8 months ago

      Yeah. The verdict is still out on whether having a deeply surly compiler will help me focus on iterating and understanding the client’s needs.

      I run Python CICD controls on main with at least the same level of prissiness (as Rust comes with), but at least Python knows how to shut up and let me prototype.

      I’m currently not convinced that Rust’s opinionated design hits a useable long term sweet spot.

      But I think if Rust adds a debug flag --fuck-off-i-need-to-try-something, it could genuinely become the next Python, and the world would be better for it.

      Edit: And if I just missed the --fuck-off-i-need-to-try-something Rust flag, someone point me at it, and I’ll gladly give Rust another run.

      • nick@campfyre.nickwebster.dev
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        8 months ago

        That flag exists, it’s called unsafe for if you need to tell the borrow checker to trust you or unwrap if you don’t want to deal with handling errors on most ADTs.

        You can always cast anything to an unmanaged pointer type and use it in unsafe code.