Why Is Rust Programming Language Becoming So Popular?
frolicorg.com
frolicorg.com
a) need solving
b) are expensive to fail at
This in an age where the easy problems are increasingly pre-solved by free libs, or can be solved fast and cheap by AI.
Rust is increasingly the best tool for high-value spaces where cheap and dirty options are obviously unworkable.
*or whatever the verb to replacing "tweeting" is.
PS: Elon now has a kid with a nonsense name that's the textual equivalent of a tramp stamp. I feel sorry for the kid having unreasonable and unwise parents.
I don't have hard numbers, but my impression from HN Who's Hiring posts is that Rust is gaining popularity and C++ is receding.
* Amazon S3, Lambda and Fargate backends are written in Rust
* Microsoft Windows is actively shipping Rust code in both the kernel and userspace
* Android also ships Rust, and Google is writing some new components / has rewritten some older components in Rust
* The Linux kernel is getting new drivers written in Rust
* Much of the core infrastructure at Discord and Dropbox is written in Rust
* Cloudflare and Facebook have adopted / are adopting Rust in some of their critical systems
* The Disney+ client application is written in Rust
* Volvo is using Rust in their entertainment system
It's beyond the point where you can consider it an irrelevant internet fad language, or a self-contained bubble. There's shallow but meaningful penetration across a pretty wide swath of industries, including some fairly conservative ones, in places where it is very likely to "stick" for a good long while.
Surely you're not going to argue that Amazon, Microsoft, Google, Facebook, Cloudflare, Disney and Volvo don't have money on the line.
My 2c: rust productivity seems to be behind that of C++ atm (which is not surprising given the different maturity).
Most language runtimes and compiler development frameworks aren't going to migrate from C++ into Rust anytime soon.
When I feel like contributing to JVM, CLR, node, GCC, LLVM, I need to provide my contribution in C++.
Same applies to anything related to GPU programming, AI frameworks, HPC, HFT, game console SDKs and major commercial engines.
Eventually it might be relevant enough that we can finally reach out for Rust in such domains, maybe even the reference compiler will be bootstrapped and no longer depend on C++, it will take some time though.
I only dispute OP's suggestion that "industry" has judged Rust to be unworthy of being used for anything important, because "it's too hard" or something. That's total nonsense.
I am still surprised how Linus as accepted it, as his C++ rants can apply equally well to Rust code full of macros and derivation annotations.
Not sure if the amount of Linux CVE caused by C is such a good reason, but then again, contrary to other OSes, there is Linus to make happy.
This isn't evident. There's some discussion that Rust isn't ready for certain applications yet for one reason or another, e.g. compiler certification, but I have not seen "strong opposition" to the idea of using Rust once the the necessary preconditions are in place. On the contrary, my understanding is that there are some automotive partners working with Ferrocene on a certified Rust compiler, to open up those possibilities.
All of the industries you mention are notoriously slow-moving, so much so that they're often stuck on C89 and C++03. That they're not jumping to adopt Rust ASAP is not evidence that they hate Rust. Obviously, if they take a decade to upgrade to newer versions of the same language, they're not going to be quick to adopt a language that's not even a decade old.
> they’re developing an entirely new language to replace c++ themselves rather than use rust.
The literal announcement FAQ of Carbon said, quote, "if you can use Rust, ignore Carbon". They're making Carbon because they have massive amounts of C++ code that they want to seamlessly interoperate with. If you don't have that constraint, the Carbon developers recommend using Rust instead. They're not adopting Carbon "instead" of using Rust, they're adopting it alongside using Rust. They announced they're going to start using Rust in Chromium FFS!
I don't feel that you're being very honest in your arguments.
Stop taking that quote out of context.
“Existing modern languages already provide an excellent developer experience: Go, Swift, Kotlin, Rust, and many more. Developers that can use one of these existing languages should. Unfortunately, the designs of these languages present significant barriers to adoption and migration from C++. These barriers range from changes in the idiomatic design of software to performance overhead.”
Their recommendation is to use a language that is available now, one of which is rust, instead of waiting on carbon. They didn’t imply any technical advantage of rust over carbon, because there aren’t any. Being less flexible isn’t an advantage.
citation needed. I've listened to plenty of CppCon talks and people in those industries don't seem averse to using Rust, just pragmatic on the timelines.
BTW, Airbus Space & Defense is looking for an intern to experiment with using Rust. That's totally something that a company that hates Rust and has already decided to never ever use it would do.
https://ag.wd3.myworkdayjobs.com/en-US/Airbus/job/Manching/I...
>turns out people with money on the line will not use a language that simultaneously takes away power from the programmer while also being more difficult to write.
Rust reduces the number of Bugs by being harder to write. C++ is already an incredibly complex and incoherent language, like any language "vendor lock in" works against people choosing the right tools.
The language forces stronger assumptions about the code (e.g. lifetimes), which allows the compiler to guarantee that certain bugs can not happen.
However I doubt anyone hits a wall with rust where they can't get anything written.
The compiler mostly complains about things you wouldn't do in C++ anyway because it would either crash right now or it would be brittle code that would be easy to break later.
I knew enough C++ when I learned rust that I never perceived the lifetimes to be something that gets in the way.
My major pain points were:
* Leaning a new standard library, the names of common functions and common tasks to do things like handling strings, iterators etc. Nothing weird, just lots of new stuff to learn
* figuring out which libraries outside the stdlib are actually a de-facto stdlib that it's ok to just use/build around (assert_matches, bytes, ...)
* endless despair of async rust. Anyway you need to compare apples to apples, with the total cesspool that c++ coroutines are
Then Zig is C done well :)
But I don't think Rust is C++ done well. It is another programming language. The Err and Ok could seem weird, traits could really be confusing. This is not against Rust, just saying that it is another programming language.
C++ allows similar error handling with std::optional (Some()/None in Rust) or std::variant (Err()/Ok() in Rust). C++ also has something similar to traits (with really unreadable syntax).
C++ just has a worse syntax for Error handling, since variants aren't enums. If you are using C++ I suggest you still make use of these concepts.
Rust has a bunch of other odd gaps, e.g. lack of proper thread-local support, but I can live with that.
I still haven't had my rust code segfault. To get to the same place with c++ I had to run a whole load of tools that aren't the compiler, but that are also more obscure and not normally mentioned in the coding tutorials.
In my experience, the biggest issue is that it is nearly impossible find experienced Rust developers who are also domain experts for systems software. A common pattern I see is that people with Rust experience have almost no real systems software or other systems language experience, so the Rust developer pool tends to be quite junior in terms of relevant domain experience where C++ is the dominant language. Ideally, you want someone who was doing systems development in C++ for many years -- it is the only way to realistically have the domain expertise -- that then became an expert in the Rust language. These exist but are very rare.
As a consequence of this, another pattern I've seen is that a lot of the Rust development is moving a bit further up the stack, where the JVM commonly lives, because it is a better match for the domain experience of Rust software devs in practice. Rust has significant advantages relative to Java in many regards. I think Rust is quite brilliant in this role but that isn't how it is commonly positioned.
My controversial view is that Rust is more likely to replace Java than C++, and is significantly more competitive against Java than C++.