5 ms·
It’s not used in industry. C++ still dominates everything rust claims to be good at, turns out people with money on the line will not use a language that simult
by alphanullmeric 3y ago
It’s not used in industry. C++ still dominates everything rust claims to be good at, 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.
- dralley 3y agoIt'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.
- constantcrying 3y agoRust is C++ done well. >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.
- cies 3y ago> Rust is C++ done well. Then Zig is C done well :)
- patrick451 3y agoThis isn't exactly praiseworthy. If a language is so hard to write you can never actually produce a line of code, of course you will write zero bugs.
- constantcrying 3y agoOf course there is a ballance. But Rust isn't indecipherable nonsense which nobody can grasp. The language forces stronger assumptions about the code (e.g. lifetimes), which allows the compiler to guarantee that certain bugs can not happen.
- cies 3y agoSeems you are not arguing in good faith. What you say is true, but totally irrelevant: language creators are not trying to make useless languages.
- patrick451 3y agoReductio ad absurdum is a valid logical argument. There's nothing bad faith about it.
- lordnacho 3y agoI wouldn't call it bad faith, that's more when someone is evading the actual point. However I doubt anyone hits a wall with rust where they can't get anything written.
- api 3y agoOnce I grasped it I found it easier to write than C++. It doesn’t actually take away power, just the power to blow your feet off. Besides you can access C-like freedom with the unsafe keyword while making it easy to search for that keyword and audit any unsafe code.
- jandrewrogers 3y agoIt is used in industry, with caveats. You often see both C++ and Rust in the same company as complementary languages. 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++.