▲ | traceroute66 4 days ago | |||||||
> Rust intentionally chooses to have a small standard library to avoid the "dead batteries" problem. There is a difference between "small" and Rust's which is for all intents and purposes, non-existent. I mean, in 2025, not having crypto in stdlib when every man and his dog is using crypto ? Or http when every man and his dog are calling REST APIs ? As the other person who replied to you said. Go just allows you to hit the ground running and get on with it. Having to navigate the world of crates, unofficially "blessed" or not is just a bit of a re-inventing the wheel scenario really.... P.S. The Go stdlib is also well maintained, so I don't really buy the specific "dead batteries" claim either. | ||||||||
▲ | tremon 4 days ago | parent | next [-] | |||||||
I think having http in the standard library is a perfect example of the dead batteries problem: should the stdlib http also support QUIC and/or websockets? If you choose to include it, you've made stdlib include support for very specific use cases. If you choose not to include it, should the quic crate then extend or subsume the stdlib http implementation? If you choose subsume, you've created a dead battery. If you choose extend, you've created a maintenance nightmare by introducing a dependency between stdlib and an external crate. | ||||||||
▲ | deagle50 4 days ago | parent | prev | next [-] | |||||||
> I mean, in 2025, not having crypto in stdlib when every man and his dog is using crypto ? Or http when every man and his dog are calling REST APIs ? I'm not and I'm glad the core team doesn't have to maintain an http server and can spend time on the low level features I chose Rust for. | ||||||||
▲ | tuetuopay 3 days ago | parent | prev | next [-] | |||||||
Sorry but for most programming tasks I prefer having actual data containers with features than an HTTP library: Set, Tree, etc types. Those are fundamental CS building blocks yet are absent from the Go standard library. (well, they were added pretty recently, still nowhere near as featureful than std::collection in Rust). Also, as mentioned by another comment, an HTTP or crypto library can become obsolete _fast_. What about HTTP3? What about post-quantum crypto? What about security fixes? The stdlib is tied to the language version, thus to a language release. Having such code independant allows is to evolve much faster, be leaner, and be more composable. So yes, the library is well maintained, but it's tied to the Go version. Also, it enables breaking API changes if absolutely needed. I can name two precendents: - in rust, time APIs in chrono had to be changed a few times, and the Rust maintainers were thankful it was not part of the stdlib, as it allowed massive changes - otoh, in Go, it was found out that net.Ip has an absolutely atrocious design (it's just an alias for []byte). Tailscale wrote a replacement that's now in a subpackage in net, but the old net.Ip is set in stone. (https://tailscale.com/blog/netaddr-new-ip-type-for-go) | ||||||||
| ||||||||
▲ | arlort 3 days ago | parent | prev | next [-] | |||||||
The go stdlib is well maintained and featureful because Google is very invested in it being both of those things for the use cases That works well for go and Google but I'm not sure how easily that'd be to replicate with rust or others | ||||||||
▲ | duped 3 days ago | parent | prev [-] | |||||||
Do you think C and C++ should have http or crypto in their standard libraries? | ||||||||
|