Hacker News new | ask | show | jobs
by timlatim 1034 days ago
I love using Rust in my toy projects (and wish my job was more open to anything but C++, but oh well). With its functional-style iterators, sum types and pattern matching, Rust lets me write code in a way that just feels natural. And the borrow checker stopped bothering me once I embraced reference-counted pointers for those cases where lifetimes are not obvious. Compilation time also hasn't been much of an issue once I moved to using dylibs for dependencies [1]. So if you want to use Rust but are wary of those problems, don't be! :)

With that said, I can't help but feel that Rust development has noticeably slowed down over the years. Don't get me wrong, I appreciate the hard work behind each release! It's just that, from my totally uninformed bystander perspective, there's been a sharp drop in people working on the language and compiler full-time since around Mozilla layoffs, and Rust still hasn't recovered from that. It's surprising and quite disappointing to see no significant manpower commitment from other corporations using Rust, like Microsoft [2] and Google [3].

As a result, while there's definitely new exciting things happening, more and more issues are piling up, many sitting unaddressed for years. Granted, it's mostly the small things that you can live without, but they all add up. Here are some examples just off the top of my head:

1. If-let chains [4] and if-let guards [5], proposed back in 2018, are still not there. I constantly encounter cases where having them would make the code much shorter and clearer. I guess that depends on what you do, though. My code is heavy on state machines and pattern matching, otherwise this may be less of an issue.

2. Const generics are still very limited (no const trait impls [6], no enums as const generic parameters [7], no float arithmetic in const [8], etc.). I understand those are hard problems, but most are known for 3-5 years by now, and there's no finishing line in sight. Comparing const in Rust to constexpr in modern C++ will leave you disappointed.

There's definitely more problems that I hit less frequently, but each compiler error linking me to some stabilization issue with years-long discussion takes away a bit of joy...

And yet I heartily recommend trying out Rust if you haven't done so yet! Behind those papercuts hides a very practical and empowering language that gives you functional constructs at high performance and with much lower chance of shooting yourself in the foot as a newbie compared to C++.

[1] https://robert.kra.hn/posts/2022-09-09-speeding-up-increment... [2] https://blogs.windows.com/windows-insider/2023/07/12/announc... [3] https://security.googleblog.com/2021/04/rust-in-android-plat... [4] https://github.com/rust-lang/rust/issues/53667 [5] https://github.com/rust-lang/rust/issues/51114 [6] https://github.com/rust-lang/rust/issues/67792 [7] https://github.com/rust-lang/rust/issues/95174 [8] https://github.com/rust-lang/rust/issues/57241

4 comments

> from my totally uninformed bystander perspective, there's been a sharp drop in people working on the language and compiler full-time since around Mozilla layoffs, and Rust still hasn't recovered from that

In terms of number of commits to the rust-lang/rust repo, activity peaked in late 2019/early 2020, whereas the Mozilla layoffs took place in late 2020. Activity since late 2020 has mostly stayed stable, and remains well above where it was at any point prior to 2018: https://github.com/rust-lang/rust/graphs/contributors

In addition, I know of several former Mozillians who remain employed to work on Rust, including one who heads the Rust team at Amazon.

As far as the number of contributors to each release, it's currently hovering around an all-time average high (although a handful of past releases have anomalously high peaks): https://thanks.rust-lang.org/

The reason that progress appears slower these days is because the low-hanging feature fruit has mostly been plucked, and what's left are the harder problems. Maintenance tasks don't make for very interesting release notes. In addition, as the language matures much of the interesting feature work has shifted from the compiler/stdlib to tooling like Cargo, rust-analyzer, etc. (whose activity might not be reflected in the above graphs).

I regularly come across sensible features that are sadly nightly-on. Corresponding features on the issue tracker tend to be years old and still open. For example, the Error trait in core as opposed to only std.
Agree with many of your points. And would add to that a frustration that allocator-api and simd are still not in stable, after so many years. Two things that impact the things I do.
> With that said, I can't help but feel that Rust development has noticeably slowed down over the years. Don't get me wrong, I appreciate the hard work behind each release! It's just that, from my totally uninformed bystander perspective, there's been a sharp drop in people working on the language and compiler full-time since around Mozilla layoffs, and Rust still hasn't recovered from that. It's surprising and quite disappointing to see no significant manpower commitment from other corporations using Rust, like Microsoft [2] and Google [3].

They brought this on themselves being Leadership By Community rather than forming a working group to get a standard out. The reason C and C++ got incredibly popular was two fold:

1. There was really no other choice

2. They were rapidly adopted by a wide variety of people, competition led to standardization, and eventually convergence on a few good compilers. `mrustc` is basically the only alternative and it's only REAL use is for an alternative bootstrap story since Rust bootstrapping is still a problem.

The entire story for Rust is rather pathetic because it would appear at every turn they made the wrong choice despite having a lookback of over 50 years of compiler evolution. Which is sad, because Rust does bring a lot of very nice things.

Because the Rust team doesn't want this path (as in, they are not even entertaining the idea) you're left with a relatively small group of very brave volunteers trying to do their best to be The Standard (TM). The hope was that with adoption from Cloudflare/Amazon/Google/Facebook you'd see a similar standardization story. But it seems none of these groups are interested in the compiler itself and instead are just interested in promoting its use.

Stabilization will be a long term concern. The inclusion in the linux kernel is minimal at best, there are some limited use cases in Asahi, etc. The success of Rust is largely mythical rather than reality. The community at large is extremely vocal to the point of zealotry which also is likely driving people off of helping with the effort. There are a lot of very smart compiler developers in the C and C++ world that don't want anything to do with Rust strictly because of it's community.

Finally, it's also possible companies that may contribute more are being driven away by the politics of the core team. There was an unbelievable discussion on whether they should allow Palantir to continue to work with them because they Do Bad Things (TM). While I can respect their opinion on the subject I cannot respect the general lack of professionalism that you see from the team. While these things don't matter with small languages they do matter a lot with big ones. This lack of professionalism bleeds into every part of the language. It's time we stop talking about Rust like it's a toy language that can get away with being edgy and hip. If it wants to survive it needs to make drastic changes towards a model used by nearly every successful language for the last 50 years.

My conclusion is if Rust wants to succeed it needs to standardize, eject every member of the existing team, and aim for a more professional (e.g. not Mozilla's brand of politics) version of itself. Otherwise it's doomed to hobbytown for the rest of its days and C++ will continue to reign supreme.

Side note:

It's nice to see they dropped the politics for this set of release notes. Maybe they're learning.

> They brought this on themselves being Leadership By Community rather than forming a working group to get a standard out.

First of all, the idea that the C++ standards process is some pinnacle of productivity and velocity is endlessly funny to me. Maybe by the time C++26 comes out, all of the features in C++23 might be considered "usable" with more than one compiler. That's saying nothing of the purgatory that certain features have been in for years.

Second, who implements the standards? Google pulled back most of their resources from Clang. Most development on C/C++ compilers is currently done by companies like Microsoft and Red Hat and Intel that have a lot of paying customers relying on those ecosystems. That's a function of time and penetration, not whether there's a "committee" involved.

Third, politics exist in C++ as well. People snipe at each other in public and on private mailing lists and conferences. They are not immune from "unprofessionalism".

I don’t get why c++ has to be bad for rust to be a good language.
I'm not criticizing C++ as such, I'm criticizing the idea that a standards committee is the reason that C++ develops quickly (and that detail isn't even obviously true), or that lack of a standards committee is the reason Rust doesn't (which also isn't obviously true).

The whole line of argument is just absurd. Look at Go or Python or Ruby - none of them are ruled by a standards committee, and all of them are very popular and see plenty of development. And frankly I don't think Rust actually develops slower than C++ does. Rust delivers features every 6 weeks rather than every 3 years, so it can be hard to tell just how much progress has actually been made even when it is actually quite a lot.

Why do people care so much about a "standard?" Multiple implementations are not actually a Good Idea nor does "The Standard" help you on the ground as a programmer.

I also don't really see zealotry anymore. I see new projects being written in Rust left and right, and C++ developers bitching about it because they don't want to learn it or have been so scarred by moderately advanced language features implemented poorly they think Rust does it poorly too.

C++ developers don’t "bitch" about rust, in my experience. They either get interested in rust or ignore it. The drama seems to always come from the rust evengelists, that won’t accept someone who don’t agree c++ should be banned and rust is the savior language…
It's legitimately baffling if you actually believe that.

99% of all programmers just want their chosen tool to succeed.

Consider that you might have been influenced by rage-baiting trolls. That's understandable and it happened to all of us at one point.

Don't judge a community by the 0.1% bad apples. Every community has them.

Sorry, it's baffling if I believe what exactly? That rust supremacists are more than 0.1% of the community? Then I can only speak of what I hear from it, and my experience is that more often than not, the discussion ends up with an implied ultimatum: either you agree that using c++ instead of rust is irresponsible and wrong, either you are being "a part of the problem" and should not be programming. I'd like to be wrong and happened to have came across mostly bad apples.
> The drama seems to always come from the rust evengelists, that won’t accept someone who don’t agree c++ should be banned and rust is the savior language…

This. This is what I find baffling that somebody can believe in. Every community has the 0.1% of insufferable zealots and Rust is no exception.

I worked with absolutely brilliant Rust programmers that made me question if I know anything at all about programming in general -- and I have 21.5 years of experience.

I keep seeing your sentiment expressed in a number of Rust threads which becomes more and more confusing with time because I scarcely see anyone at all advocate zealously for Rust but I am seeing plenty of people like you who keep insisting that Rust fans are torturing them. :D

It gets funny at one point.

I mean, try to be more data-driven. Scan the last 5 big Rust threads and just try to do basic sentiment analysis. I have, and I am mostly seeing very balanced and curious debates. I haven't noticed any zealotry. Last time I noticed people being as annoying was I think somewhere back in 2018.

yes, the language you use to describe something completely wrong is baffling.

you have been tricked into being mad at something that literally doesn't matter.

> There was an unbelievable discussion on whether they should allow Palantir to continue to work with them because they Do Bad Things (TM).

Well, since it's community driven, this makes perfect sense. Freedom of association and all.

  politics
That's a lot of words for "I don't like the politics of the people contributing to rust" with a side of "there must be a lot of people like me and they're all very smart". If I'm honest, that doesn't seem terribly professional or realistic.

As someone who's not a compiler guru, I've found contributing to rust (whether rustc or third party crates) to be generally frictionless and overall a pleasant process. It's great to not have to deal with the drama surrounding so many other projects (EGCS anyone?). Quite frankly I'm glad there's no need to hold your nose and put up with RMS' antics.

  eject every member of the existing team
What? Ejecting everyone who's built the tool you like because you don't like their politics is preposterous on its face and wildly unprofessional.

  Rust bootstrapping is still a problem
What?
Since I entered Rust (circa 2018-2019) and async/.await was stabilized, I started to lose my expectations on the growth of the language. Almost every language issue I wanted to be resolved is still unresolved (besides GATs, which are great but took a really long time to be shipped). Meanwhile, the community doesn't cease to perpetually endorse the language; you literally see top-scoring posts like "I felt in love with Rust, can't stop loving Rust, it's so wonderful" every month or so on r/rust, a lot of reaffirming articles expounding on the "success" of the language, collective exultation when it's again most loved on SO, etc.

The current situation with the language is somewhat sad.

> Meanwhile, the community doesn't cease to perpetually endorse the language

I can't speak for you, but I endorse Rust because I like the language as it exists, not as it might exist in the future, and it seems safe to assume that the other people endorsing it feel the same way, and that people who feel differently are not (and should not be) endorsing Rust. As far as my use cases are concerned, there's no language feature that Rust is missing or that would significantly improve my life (although I suppose inline const would be nice).

(And as far as tooling features go, the only thing that I want is sandboxed builds.)

Clearly the state of the language post-async/await is good enough that tens of billions of dollars, probably more, are riding on it. There's still lots that needs to be done but the language is in pretty good shape today.

Why shouldn't people fall in love with Rust and post about it? I fell in love with Rust before NLL even.

> you literally see top-scoring posts like "I felt in love with Rust, can't stop loving Rust, it's so wonderful" every month or so on r/rust

That's expected on any forum dedicated to <subject>. People tend to only specifically seek out communities around subjects they like, not dislike.

Could you expand on what language issues you want resolved that the project isn't addressing?
Async traits, async `Drop`, TAITs, variadic generics (unlikely they will every be implemented), generic closures, optional/named parameters, anonymous enums. These are the first that came to my mind.
Thank you for the list! That's useful for me to understand what we might not be actively working on that people find frustrating.

- Async traits: coming soon https://blog.rust-lang.org/inside-rust/2023/05/03/stabilizin..., actively in development (and has been for a while now, please don't confuse "this problem is hard and taking a long time" with "we don't care about this problem" https://github.com/rust-lang/rust/issues?q=is%3Aissue+label%...).

- async `Drop`: there have been multiple "false-starts", trying to come up with an acceptable design. We don't have a good answer for this at the moment. It is unknown to me how long it might take for us to figure it out.

- TAITs: same as async traits. It'll likely land after async fn in traits, but it's part of the same design and implementation effort.

- variadic generics (unlikely they will every be implemented): agree with your assessment, at least in the short to medium term.

- generic closures: same as above.

- optional/named parameters: I believe that this feature as such might never exist in rust but think that a combination of structural structs (`struct { bar: usize, baz: usize }`) and/or struct literal inference (`let x: S = _ { bar: 1, baz: 2 }`) and default const values in structs (`struct S { foo: usize = 42, bar: usize }`/`S { bar: 0, .. }`) would be more generally useful and would nicely cater to this use case (`foo(_ { bar: 42, .. }`).

- anonymous enums: I want this as well, but it interacts poorly with type parameters and automatic type upcasting (if you have `A | B` can you convert it into `A | B | C`? Does it need syntax? What about `Result<(), ()> | Option<()> | Result<i32, ()>`? If you have a function that returns that, what does `return Err(())` do?). Type downcasting could be done by forcing a match expression on the value. Whether `A | B` should `impl T` if `A: T, B: T` is an open question. I want to push for a solution here in the coming year.

> TAITs

I personally find these 4 letter acronyms difficult to lookup and understand. One of the T is probably "trait", but I always forget.

Thanks for your comprehensive answer, it's really nice to see that async traits and etc. might be coming soon.