7 ms·
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 patter
by timlatim 3y 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-incremental-rust-compilation-with-dylibs/ https://robert.kra.hn/posts/2022-09-09-speeding-up-increment...
[2] https://blogs.windows.com/windows-insider/2023/07/12/announcing-windows-11-insider-preview-build-25905/ https://blogs.windows.com/windows-insider/2023/07/12/announc...
[3] https://security.googleblog.com/2021/04/rust-in-android-platform.html https://security.googleblog.com/2021/04/rust-in-android-plat...
[4] https://github.com/rust-lang/rust/issues/53667 https://github.com/rust-lang/rust/issues/53667
[5] https://github.com/rust-lang/rust/issues/51114 https://github.com/rust-lang/rust/issues/51114
[6] https://github.com/rust-lang/rust/issues/67792 https://github.com/rust-lang/rust/issues/67792
[7] https://github.com/rust-lang/rust/issues/95174 https://github.com/rust-lang/rust/issues/95174
[8] https://github.com/rust-lang/rust/issues/57241 https://github.com/rust-lang/rust/issues/57241
- zer8k 3y ago> 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.