• just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    20
    ·
    18 hours ago

    RUST AGAIN.

    Just throwing this out because I’ve been hammering this Rustholes up and down these threads who claim it’s precious and beyond compare 🤣

    I will almost certainly link back to this comment in the future.

    • lmmarsano@lemmynsfw.com
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 hours ago

      Programmer explicitly bypasses code safety with unwrap.
      Let’s blame it on their programming language!

      Cool hot take, brah.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      11
      arrow-down
      1
      ·
      9 hours ago

      Ift is precious and beyond compare. It has tools that most other languages lack to prove certain classes of bugs are impossible.

      You can still introduce bugs, especially when you use certain features that “standard” linter (clippy) catches by default and no team would silence globally. .unwrap() is very controversial in Rust and should never be used without clear justification in production code. Even in my pet projects, it’s the first thing I clear out once basic functionality is there.

      This issue should’ve been caught at three separate stages:

      1. git pre-commit or pre-push should run the linter on the devs machine
      2. Static analysis checks should catch this both before getting reviews and when deploying the change
      3. Human code review

      The fact that it made it past all three makes me very concerned about how they do development over there. We’re a much smaller company and we’re not even a software company (software dev is <1% of the total company), and we do this. We don’t even use Rust, we’re a Python shop, yet we have robust static analysis for every change. It’s standard, and any company doing anything more than a small in-house tool used by 3 people should have these standards in place.