• MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    3
    ·
    3 days ago

    But the reason people (re) write programs in Rust is because Rust as a language has a lot of guardrails that help make a program more stable, more correct. That reliability is the real reason for Rust.

    Yeah, but then the Node-like atomic packaging runs contrary to optimization and security by shoving 500 MB of code in your cli-tool. And sure, the compiler optimizes 90% of it away. But that’s not how you build stable software.

    • boonhet@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      You could just use the standard library and refrain from using third party libraries? That’s how you get a smaller binary size in just about any language.

      • jollyrogue@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        Sure. People who do that are going to be reimplementing lots of stuff on their own and creating libraries, so they might as well leverage the work of the community.

        People need to vendor their 3rd-party libraries and audit them regularly.

    • SorteKanin@feddit.dk
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      3 days ago

      I agree that dependencies and package management is a real problem in programming nowadays, but it is not a problem unique to Rust. In fact, I struggle to name a single popular language nowadays that doesn’t have the exact same problems.

      It’s not so much “But that’s not how you build stable software.” It’s more like “But that’s not how you build software [at all today].” Modern software is powered by loads of shared packages, that’s just how all modern languages work. This is equally true for Rust and Python.

      Rust still has the edge here btw. Rust libraries (crates) are often very high quality with very good documentation. The language again helps here a lot, by providing extensive tooling for automatic documentation generation. Documentation in other languages are is far less helpful or poorly written. This is also again something that helps an AI write better code (just as it helps humans write better code).

      The packaging also helps elevate Rust to a high-level language, because you can build easily usable abstractions in packages that can be used in simple programs. All the complexity can be hidden away in a crate and suddenly Rust feels more like Python. I think that’s actually a good thing from package managers.

      • capital5@discuss.tchncs.de
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        It’s not so much “But that’s not how you build stable software.” It’s more like “But that’s not how you build software [at all today].” Modern software is powered by loads of shared packages, that’s just how all modern languages work. This is equally true for Rust and Python.

        You’re not wrong - all libraries with automated dependency packaging do have this problem. But you’re downplaying the scale by a lot. Javascript dependency graphs are absolutely massive. Python has a decent standard library that reduces the number of shared packages by quite a bit. There are definitely downsides to having a large standard library like Python has, but it does significantly reduce the probability of a supply chain attack compared to Javascript.

        I can’t comment on Rust personally, since I don’t have much experience with the ecosystem.

      • MonkderVierte@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        3 days ago

        Sure, yes, Rust has lots of quality libraries too. I’m thinking of doing the core in D and the GUI in Rust Slint. Plug-in protocol interface modules can be written in whatever, but Rust has some interesting libraries.