Hacker News new | ask | show | jobs
by gostsamo 1552 days ago
It solves a large class of problems that are not handled in C and C++. Some people are hyped that it can solve all problems under the son, while others don't like the hype talk or are deeply invested in C and C++ knowledge and don't like their belittlement.
3 comments

Without compare language/platform abilities, it looks like a major hype cycle like Node or even Java back in the 90s and early 2000s. I read HN and see a lot of stuff around Rust that I don't see elsewhere, so this is also kind of a "why here?" question too. =)
I don't know where do you compare it to, but the advantages of rust are more technical and not so business oriented as Node or Java. Node and Java were "write once, use twice or more" and it was a major business saving of time and developer resources. Rust's advantage is correctness and lack of bugs which is harder to sell to execs whose horizon is the next quarter profits and not the long-term maintenance costs of the project.
I remember getting into a an argument about Java being overhyped in 1995 but you know Java is still here…. AWT is dead, Swing is dead, JavaFX is dead, applets are dead but Java is still heavily used.
JavaFx is dead?
There isn’t anything you can do in Rust that somebody couldn’t do in C-Thulu, but the Rust version might be secure and the C-Thulu version won’t be.
There are lots of things C++ can do where Rust can't (ex. templates in C++ are much more powerful than Rust's generics as of now), and lots of things Rust can do where C++ can't (ex. handling memory ownership in a much more secure way, hygienic and procedural macros). You might still want to use C++ for any sort of complex programming involving numerical computation and graphics (Rust is getting there but is still a bit weak in some aspects), but for any mission-critical service related to the Web you would be more inclined to choose Rust (because of async support, and since C++ is horribly insecure for any sort of web programming).
Note that generics in Rust are not intended to replicate everything that C++ templates do, Rust has macros for the more complex uses. There's also a lot of vaporware coming from C++ standard development proposals about "metaclasses" and "reflection" being added to some future version of C++, this would basically be their way of doing the equivalent of hygienic macros in Rust. C++ has also added recent support for parallel and heterogenous programming (GPUs, accelerators etc.) for which Rust has no equivalent as of yet.
Curious - what class of problems do you see Rust and its ecosystem handling that C++ doesn't?
Rust may allow 100 engineers to work on the same codebase without spending all their time debugging memory corruption errors. I say "may" because I don't have firsthand experience in a team that big.
I'm hoping to hear something other than debugging memory corruption errors. I've worked in C++ for 15 years in 4 different organizations and across many different teams and memory corruption was never really an issue, certainly not enough of an issue to abandon C++ and adopt a whole new ecosystem. This is the primary reason I hear for adopting Rust and it just isn't an issue for me so I'm interested in learning what other classes of problems does Rust and its ecosystem resolve?
> and it just isn't an issue for me

You have those two findings from Google and Microsoft that roughly 2/3 of the vulnerabilities that they find in their code are memory related, so it is definitely something that someone finds important. Also, if you have large scale codebase that is serving millions of people, the assurance of less bugs is much better starting proposition than maybe it won't fail.

If you aren't handling string data from external sources then memory bugs aren't a big deal, I think most low level developers today don't deal with a lot of external string data so to them Rust doesn't really offer much. But for the roles where almost all you do is pipe or parse around data packets then I see the strong appeal, but to me such applications aren't very interesting. So crypto libraries, browser engines and the networking part of servers.
I wonder if part of the problem Google and Microsoft has is they have so many developers having so little real-world experience in a language such as C++? Back in the day we used to be very careful with who did C++ work because it makes it so easy for inexperienced developers to shoot themselves in the foot. But really though, for an established team not having these kinds of issues and not having a lot of new hires to contend with then what else is Rust providing?
No idea. However, every sufficiently complex project will become harder to manage with the accumulation of changed requirements, refactorings, and unavailable contributors. For this reason only the automated analysis of code could benefit an organization by transfering part of the work outside of the human competency domain.