News for hackers. Stuff that matters.
Re:Google's Rust Style Guide by npalli on Wednesday October 21, 2026 @04:26PM (#50187134)
Far from it. Until Rust can read C++ code seamlessly, there will be more code written in C++ than Rust for the foreseeable future. HPC, Finance, AI, Games, Databases, Hardware all continue to be written in C++.
Re:Google's Rust Style Guide by simonask on Wednesday October 21, 2026 @07:05PM (#50188902)
Serious people in all of those industries are thinking about whether and how Rust is a fit for their needs.

Like, I agree that C++ will be around for a long while, but the writing is on the wall.

Re:Google's Rust Style Guide by npalli on Wednesday October 21, 2026 @07:36PM (#50189132)
Strange position in 2026. If there is any writing in the wall it is this. Nobody is going to be writing Rust code from scratch given where LLMs are already now, much less in 5 years. A golden rule of software is fresh coding is a small part of the lifecycle most of it is maintenance. You may be able to get people to write Rust code (vibe code it), however a tiny minority of them will want to maintain LLM generated Rust code!! Rust will most likely be an intermediate representation - a security/formality check of sort - before converted into the appropriate heterogenous code across GPU/CPU/TPU/XPUs. Even there some other better representation will supplant it as Rust's ideas will be found too limiting. The idea that you as a programmer will sit and write Rust source code is just going to look very archaic. Thank god for LLMs for saving everyone just in time.
Re:Google's Rust Style Guide by simonask on Thursday October 22, 2026 @06:03AM (#50193362)
I keep seeing this take, but oddly only on Hacker News, never anywhere else. It's still utterly delusional.
Re:Google's Rust Style Guide by 20k on Wednesday October 21, 2026 @07:54PM (#50189254)
For game development its hard to see how Rust can really replace C++ in practice. It'll take 15 years at minimum to replace the current development ecosystem for building games
Re:Google's Rust Style Guide by tonyhart7 on Wednesday October 21, 2026 @08:36PM (#50189573)
"It'll take 15 years at minimum to replace the current development ecosystem for building games"

15 years of pre LLM or post LLM ?????

Re:Google's Rust Style Guide by rudedogg on Wednesday October 21, 2026 @10:15PM (#50190342)
Also, the language just isn’t suited well to making games. Can anyone point me to a successful Rust game? Bevy game?
Re:Google's Rust Style Guide by dbdr on Wednesday October 21, 2026 @11:45PM (#50190946)
Re:Google's Rust Style Guide by QuantumNomad_ on Thursday October 22, 2026 @01:18AM (#50191471)
Successful as in they completed building the game, or successful as in lots of copies sold?
Re:Google's Rust Style Guide by dwattttt on Thursday October 22, 2026 @03:59AM (#50192519)
The Gnorp Apologue (https://www.reddit.com/r/rust/comments/18ul125/writing_a_gam...) has done pretty well.
Re:Google's Rust Style Guide by simonask on Thursday October 22, 2026 @06:18AM (#50193459)
Large game engines consist of many medium to large software libraries stitched together. What you're likely to see is that each such library is gradually either rewritten or replaced by Rust code, with an FFI compatibility layer matching the existing ABI where possible.

There's no reason to think that current game engines will have their fundamental APIs around scene management, serialization, entity composition, and so on, ported directly to Rust, because these things are typically designed around available language features. For example, an engine written in C++ might have its own version of `dynamic_cast` and RTTI, and that's going to be an extremely awkward design in any other language.

I think 15 years is too high, but I agree that it will be a while, because a triple-A game engine is a huge investment.

Re:Google's Rust Style Guide by loeg on Wednesday October 21, 2026 @08:55PM (#50189736)
I agree momentum for Rust is growing, but disagree that it is obvious the writing is on the wall for C++. Like, Java and C# didn't kill C++, either. In all likelihood, these languages will all coexist for a long, long time.
Re:Google's Rust Style Guide by afdbcreid on Thursday October 22, 2026 @02:06PM (#50198968)
Java and C# did kill C++. They just did it only in places they were feasible. People forget that before them, it was very common to write application and even serve code in C++. Now Rust is targeting its remaining niche(s).
Re:Google's Rust Style Guide by flossly on Thursday October 22, 2026 @05:19PM (#50201195)
Yes, at least Rust and Zig have answers for the remaining niches.

Rust's type system is making it's compile times bigger than C, C++ and Zig. This does keep it away from some code that's currently C or C++.

Re:Google's Rust Style Guide by simonask on Thursday October 22, 2026 @05:30PM (#50201312)
This is a common misunderstanding. Rust’s type system and borrow checker are not significant reasons for its compile times, and Rust compile times aren’t really worse than equivalent modern C++ code.
Re:Google's Rust Style Guide by flossly on Thursday October 22, 2026 @05:33PM (#50201354)
Not sure what you mean by modern C++ code.

But Rust's type system an borrow checker are not something you want to go without in Rust, while in C++ many codebases prevent the use of some features to reduce compile time right?

Re:Google's Rust Style Guide by simonask on Thursday October 22, 2026 @05:58PM (#50201640)
Modern C++ is characterized by relying on templates for generics and reusability, as well as static dispatch.

“Traditional” C++ looks a lot more like Java, and often like C.

Much of the compile time of both Rust and C++ comes from monomorphization and linking, both of which do a lot of work to support the zero-cost high-level abstractions favored by both languages.

Re:Google's Rust Style Guide by flossly on Friday October 23, 2026 @09:37AM (#50208786)
You said:

> Rust’s type system and borrow checker are not significant reasons for its compile times

But isn't "hard" monomorphization a property of more complex type systems (generics, type variables, etc.)?

Re:Google's Rust Style Guide by afdbcreid on Saturday October 24, 2026 @01:06PM (#50223144)
Sure, but in this context, the meaning was clear to refer to the differences from C++.
Re:Google's Rust Style Guide by pjmlp on Friday October 23, 2026 @05:56AM (#50206595)
Game companies are one example were server code is still mostly C++.
Re:Google's Rust Style Guide by imron on Thursday October 22, 2026 @05:40PM (#50201429)
1.5 billion lines of Cobol are still written per year.