The post mentions data or research on how rust usage in is resulting in fewer errors in comparison to C. Anyone aware of good sources for that?

  • CHOPSTEEQ@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 months ago

    Anecdotally I converted a python app to rust and suddenly had no more runtime errors. It’s utter bliss.

    • maegul (he/they)@lemmy.mlOPM
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 months ago

      That’s interesting. What made the difference? The type system? Or memory safety constraints forcing more correct logic?

      • CHOPSTEEQ@lemmy.ml
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 months ago

        Both. It allowed/forced me to explicitly handle edge cases I wasn’t thinking about. That means the error doesn’t happen at run time, but at compile time (or while writing!) so technically speaking the errors didn’t go away, they moved to in my face rather than “maybe in the future.”

        Most of the time the remedy was to explicitly catch whatever happened and nicely explain what happened, vs looking at empty production logs because logging is turned down.

        It’s certainly a preference, but for me, I’d rather argue with the compiler all day long and push a bulletproof release than quickly ship something I thought was good and be embarrassed.

        • maegul (he/they)@lemmy.mlOPM
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 months ago

          while writing!

          Yea, understated IMO how much the compiler requirements actually manifest directly in the writing process with LSPs etc.

          Most of the time the remedy was to explicitly catch whatever happened and nicely explain what happened

          Yea even that is making the logic more water tight.