Here's a summary of the themes expressed in the Hacker News discussion:
The Meaning of "Rust Won"
There's a significant debate about what it means for Rust to have "won" and whether it has actually achieved this status. Some users argue that Rust has indeed won due to substantial industry investment, demonstrated value, and significant user adoption compared to functional languages with similar type systems. They point to its widespread use in big tech companies and its adoption for critical infrastructure like Kubernetes.
"By any standard of language development rust "won" in that a decade after creation it has a thriving ecosystem and companies using it exclusively. The White House named it by name." - jvanderbot
However, others are more skeptical, suggesting that while Rust has momentum and won "the argument" for certain programming paradigms, the ecosystem still has significant growing pains and isn't a fully realized success story.
"I would say it won like it won the lottery, not like it won the tournament." - jvanderbot
"Rust won the argument." - tialaramex
Ecosystem Health and Library Quality
A recurring theme is the perceived state of the Rust ecosystem, particularly regarding the quality and maintenance of its libraries. While some users find the ecosystem to be actively growing and producing high-quality libraries, others lament the prevalence of โghost townโ or abandoned libraries and the need to rewrite existing tooling.
"Despite this, I'm not sure if "won" is the right word because to my very uneducated eyes there is still considerable amount of Rust not succeeding. Admittedly I don't write so much Rust (I should do more!) but when I do it either baffles me how tons of the libraries recommended online are ghost town. There are some really useful Rust libraries out there that weren't maintained for many years. It still feels like Rust ecosystem is not quite there to be called a "successful" language." - gnulinux
"I find a lot of Rust libraries "seem" dead, based on github activity, but looking into it, they are actively used in many projects. I think Rust projects just tend to have less open issues, and don't need to be maintained as often. This is also the case internally at my company." - eldenring
"I've complained about that in the 3D graphics area. But that's niche. Recently I had to write some webcrap, a web server responder that runs under Apache mod_fcgid. I expected that area to Just Work. Works fine in Go, out of the box. There were about a half-dozen abandoned crates which sort of implemented that kind of server. I had to write one from scratch." - Animats
The rapid evolution of Rust itself is cited as a reason why older libraries can become unmaintained, especially when new language features require API updates. The lack of consistent maintenance for some libraries is a concern for users planning long-term engagements with the language.
"The ecosystem is so large that the old part is large too. Rust is now mainstream, so it's not a dozen libraries made by dedicated early adopters any more. People learning Rust publish their hello world toys, class assignments, their first voxel renderer they call a game engine. Startups drop dozens of libraries for their "ecosystem"." - pornel
Usability and Developer Experience
The usability and developer experience of Rust are frequently highlighted as key strengths, contrasting with the perceived complexity of implementing certain programming patterns. The compiler's error messages are often praised, and the language's ability to make functional programming concepts accessible is noted.
"My thesis is that Rust won on usability above all else... But by making the language actually usable with good errors, familiar syntax (yes, syntax matters!), and documentation, Rust got users." - hardwaregeek
"Rust has a combo: people come for safety, stay for usability." - pornel
However, there's also a counterpoint that the learning curve for Rust, especially for newcomers or those unfamiliar with its specific paradigms like lifetimes and async, can be steep, making it less universally "usable" than languages like Python or Go for beginners.
"For me usability means also how usable it is to new people. How usable is the language to a foreign person compared to e.g. Python, Go or even Java - or if you want to mention functional languages like F#?" - mrklol
Challenges with Non-Hierarchical Ownership and Complex Data Structures
A significant portion of the discussion delves into the difficulties Rust can present when dealing with non-hierarchical data structures and complex ownership models. Users identify challenges with patterns common in areas like GUI development, intrusive lists, and certain data structures where objects need to be shared or referenced in ways that don't fit Rust's tree-like ownership model.
"From what I'm aware of, Rust has poor ergonomics for programs that have non-hierarchical ownership model (ie. not representable by trees), for example retained mode GUIs, game engines, intrusive lists in general, non-owning pointers of subobjects part of the same forever-lived singleton, etc." - TuxSH
The "proper" Rust way to handle these scenarios often involves extensive use of Rc
, RefCell
, and Weak
pointers, which, while safe, can be verbose and difficult to get right. This leads some to suggest that alternative approaches, like using array indices or arena allocation, which bypass Rust's ownership system, might be simpler, though potentially more error-prone.
"It's 100% safe rust. This is the "proper" Rust way to write this sort of thing. The nice thing about doing it the "right" way was that, once it compiled, it needed few changes to work correctly. No mysterious errors at all. But it took a lot of work to get it to compile. Some sections had to be rewritten to get the ownership plumbing right." - Animats
"I put it up on the Rust forums for comments, and got replies that I should stop doing all that fancy stuff and just use indices into arrays. Or arena allocation. Things that bypass the Rust ownership system. Those approaches would probably have more bugs." - Animats
The discussion also touches on the limitations of Rust's move semantics and their impact on implementing memory-safe C++-like systems with flexible referencing.
"One reason being that in Rust, if an object is moved, its original memory location becomes invalid without any destructor/drop function being called. So there's no opportunity to inform any targeting (smart) pointers of the invalidation. So, as you noted, the options in Rust are less optimal. (Not just "ergonomically", but in terms of performance, memory efficiency, and/or correctness checking.) And they're intrusive. They require that the target objects be allocated in certain ways." - safercplusplus
Rust's Position Against Other Languages (Go, C++, Java)
Comparisons with other languages like Go, C++, and Java are prevalent, particularly concerning their respective strengths and weaknesses relative to Rust.
Go is seen as a strong competitor, particularly in cloud-native development, with many users asserting that Rust "will not 'flatten' Go" due to their different use cases and target audiences. Go's popularity in open-source and industry, coupled with its ecosystem (especially Kubernetes), positions it as a significant player.
"Rust will not "flatten" Go. They have some overlap but generally don't serve the same purpose and don't appeal to the same crowd." - speed_spread
"Go in cloud is like Python in AI" - melodyogonna
C++ is viewed by some as a language Rust is a natural progression from, offering safety and performance. However, this is contested, with others arguing that Rust has limitations that prevent a wholesale replacement of C++. The discussion highlights C++'s ongoing evolution (e.g., C++20 constinit
, std::construct_at
) offering solutions to some of the problems Rust aims to solve, albeit through different mechanisms.
"Still, I see Rust as the natural progression from C++." - beeflet
"I don't; Rust has its niche but currently can't replace C++ everywhere." - TuxSH
Java is acknowledged for its improvements and robust platform, but it's seen as less competitive for scenarios requiring small, fast native executables, where Rust and Go excel.
"Compared with Go Java is fully memory-safe and have independent implementations." - fpoling
"But Java will not beat Go where small and fast native executables are required. The native story for Java will remain a sad one, builds being hyper slow (aot) or resulting in huge binaries (jlink)." - speed_spread
The Role of Mozilla and Rust Diaspora
The impact of Mozilla's layoffs on the Rust team and the subsequent "diaspora" of Rust talent into big tech companies is noted as a positive development. This distribution of knowledge is seen as preventing any single company from dominating Rust development, fostering a strong sense of collaboration and a shared mission within the community.
"Result: Rust knowledge well distributed around industry. No one company dominates... Strong sense of community & common mission." - fulafel
This contrasts with languages like Java, Swift, Go, C#, and Dart, where development is perceived to be more centralized within their founding companies.
Curation and Quality Control of Crates.io
The sheer volume and variable quality of libraries on crates.io are a point of concern for some. The desire for a more curated and security-audited alternative repository to crates.io is expressed, particularly for organizations with strict regulatory, safety, or security requirements.
"I personally would love to see a heavily moderated, curated, security hardened crates repository as an alternative to crates.io that contains only well-maintained, security audited, organizationally vetted crates." - cmrdporcupine
"Crates.io is starting to clog up with junk." - Animats
While sites like lib.rs
are mentioned as attempts to curate and present library information, the need for more robust mechanisms for ensuring library quality and maintenance is a clear theme.