this post was submitted on 30 Mar 2024
1551 points (97.7% liked)

linuxmemes

21393 readers
1362 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
    you are viewing a single comment's thread
    view the rest of the comments
    [–] areyouevenreal@lemm.ee 1 points 7 months ago (1 children)

    Can you give some examples of things missing from Rust standard library?

    [–] wolf@lemmy.zip 4 points 7 months ago (1 children)

    Easily, just look at the standard libraries of Java/Python and Golang! :-P

    To get one thing out of the way: Each standard library has dark corners with bad APIs and outdated modules. IMHO it is a tradeoff, and from my experience even a bad standard library works better than everyone reinvents their small module. If you want to compare it to human languages: Having no standard library is like agreeing on the English grammar, but everyone mostly makes up their own words, which makes communication challenging.

    My examples of missing items from the Rust standard library (correct me, if I am wrong, not a Rust user for many reasons):

    • Cross platform GUI library (see SWING/Tk)
    • Enough bits to create a server
    • Full set of data structures and algorithms
    • Full set of serialization format processing XML/JSON/YAML/CVS/INI files
    • HTTP(S) server for production with support for letsencrypt etc.

    Things I don't know about if they are provided by a Rust standard library:

    • Go like communication channels
    • High level parallelism constructs (like Tokyo etc.)

    My point is, to provide good enough defaults in a standard library which everybody knows/are well documented and taught. If someone has special needs, they always can come up with a library. Further, if something in the standard library gets obsolete, it can easily be deprecated.

    [–] areyouevenreal@lemm.ee 3 points 7 months ago (1 children)

    Python doesn't have a production web server in its standard library. Neither does Java. Those are external programs or libraries. C# is the only language I know that comes with an official production grade server, and that's still a separate package (IIS).

    Rust has a set of recommended data structures in their standard libraries too: https://doc.rust-lang.org/std/collections/index.html

    I don't know what algorithms you are looking for so can't answer here.

    The rest I don't think are included in Rust. Then again they aren't included in most languages standard libraries.

    [–] wolf@lemmy.zip 3 points 7 months ago

    Golangs web server is production grade and used in production. (Of course everyone uses some high performance proxy like NGINX for serving static pages, that's another story.)

    Technically you are right that java has no production web server, which I don't like, OTOH Java has standard APIs WebServers and Spring is the defacto standard for web applications. (I totally would not mind to move Spring into the OpenJDK.)

    My point is simple: Instead of having Rust edtion 2020, 2021 etc. and tweaking the syntax ad infinitum, I'd rather have a community which invests in a good/broad standard library and good tooling.

    The only platform widely used in production w/o a big standard library is Node.js/JavaScript, mostly for historical reasons and look at the problems that Node.js has for a decade now because of the missing standard library.