• dhork@lemmy.world
    link
    fedilink
    English
    arrow-up
    105
    arrow-down
    2
    ·
    20 hours ago

    Just because you’re writing in a shiny new language that never misses an opportunity to crow about how memory safe it is, doesn’t mean that you can skip due diligence on input validation, checking every return value and writing exception handlers for even the most unlikely of situations.

    Lol

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      6
      ·
      12 hours ago

      I swear, every time I start to think that I go overboard with this sort of shit in my scripts for work, I either find another ridiculous edge case or a story like this comes out.

      • Noja@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        20
        arrow-down
        1
        ·
        17 hours ago

        Memory leaks are logic errors, Rust can’t really prevent you from leaking memory.

        • socsa@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          16 hours ago

          Some memory leaks are logic errors, and this is honestly the irony of modern dynamic languages. I have actually gotten into the argument in interviews before - it is arguably safer (and better) to work from maximal static memory allocations with memory safe data objects than it is to implement dynamic memory algorithms just because they are fun coding problems.