4 ms·
It's used in industry. Obviously it's not yet comparable to the scale on which C++ is used in industry, but it absolutely is used. * Amazon S3, Lambda and Far
by dralley 3y ago
It's used in industry. Obviously it's not yet comparable to the scale on which C++ is used in industry, but it absolutely is used.
* 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.
- linza 3y agoMaybe it's too polarizing as GP phrased it, but my anecdotal experience with two of the items you mentioned is wait and see, and having some early investment to not miss anything. C++ is still the safer bet, esp if you factor in the long term non-technical aspects like reliably finding talent, onboarding, and so on. My 2c: rust productivity seems to be behind that of C++ atm (which is not surprising given the different maturity).
- pjmlp 3y agoFull on the spot, yet some reality check is also required when talking about Rust. 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.
- dralley 3y agoSure, I don't dispute any of that. C++ isn't going anywhere anytime soon. 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.
- pjmlp 3y agoAnd that I agree with.
- EGreg 3y agoBut contributing to the Linux kernel in C++ is gonna get you laughed out of the room. For that, you famously must go back to C — and for good reason!
- pjmlp 3y agoYeah, and that should be lesson to Rust folks, some domains are religiously against anything but C. 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.
- alphanullmeric 3y agoMeanwhile game engines, embedded, spaceflight, aerospace, automotive, financial infrastructure and high frequency trading, medical software, scientific computing etc. continue to be dominated by c/c++ with strong opposition to rust. Almost all of the companies you’ve listed have more c++ than rust, and significantly more new c++ code added to their public repositories every day than rust. google is an especially hilarious example to use in favour of rust when they’re developing an entirely new language to replace c++ themselves rather than use rust.
- dralley 3y ago>with strong opposition to rust 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.
- alphanullmeric 3y agoThere is strong evidence, by the opinions of developers working in those industries. Because rust imposes more work onto the developer, it takes less time to write C++ and debug any safety issues than it does to get anything working in rust. There are C++ game engines with far fewer man hours put into them than bevy that have produced much more spectacular results. 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.