What do you think about the points the authors makes?

    • Rustmilian@lemmy.world
      link
      fedilink
      English
      arrow-up
      26
      ·
      edit-2
      7 months ago

      The only point I found that falls under “questionable choices” is :

      “If you go looking for compression support in Rust, there’s none in the standard library. But you may notice the flate2-rs repo under the official rust-lang GitHub namespace. If you look at its transitive dependencies: flate2-rs depends on (an individual’s) miniz_oxide which depends on (an individual’s) adler that hasn’t been updated in 4 years. 300 lines of code including tests. Why not vendor this code? It’s the habits a small standard library builds that seem to encourage everyone not to.”
      “Even official packages may end up depending on external party packages, because the commitment to a small standard library meant omitting stuff like compression, checksums, and common OS paths.”

      Which is somewhat valid, but imo it’s really not as big of a deal breaker as they’re trying to make it out to be.

  • Ephera@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    7 months ago

    IMHO the biggest advantage of a small stdlib is that breaking changes become possible in those extracted libraries. If flate2 needs to change its API for whatever reason, it can release a 2.0.
    Or I guess, there can be a flate3, too.

    In particular, it also becomes possible for the whole ecosystem to slowly move over to a different library, as for example happened with failure to anyhow.

    If it’s part of the stdlib instead, you can only do breaking changes by giving new names to function or whole modules, which will stick around forever and confuse noobies.

    For example, want to copy a file in Python? Well, here’s a helpful spreadsheet for all the different ways you can do that: https://stackoverflow.com/a/30359308

    I mean, it’s not all black-and-white. Rust has the contrary problem that the recommended library can be difficult to find out for noobies. And we may very well end up in a situation like JS, where you open a StackOverflow post and you have to look for more recent responses, because early answers are just woefully out of date.

  • porgamrer@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    7 months ago

    A bit tangential, but if the US government really commits to pushing big tech firms to migrate to memory safe languages, where would that leave Zig?

    It seems completely implausible to rewrite all the deployed C and C++ in the world any time soon. Even so, the uncertainty created by a top-down push might be enough to stall adoption of an unsafe language.

    I just wondered if anyone knows whether that story has affected the plans of the Zig maintainers at all. Or whether there has been any spike in Rust job postings?