Hacker News new | ask | show | jobs
by crystalgiver 3956 days ago
Ugh, if you bring up Rust in this thread it's clear you have little to no experience actually writing large amounts of system-level code. Rust has been around for all 2-3 years now? 1.0 for what? Months? What large successful Rust code bases have you worked on? What have you actually built with Rust?

C++ is for people who work on large mature codebases, deal with practical issues, and actually build stuff. Talk to me about the virtues of Rust when you actually have real experience.

4 comments

> What large successful Rust code bases have you worked on? What have you actually built with Rust?

> C++ is for people who work on large mature codebases, deal with practical issues, and actually build stuff. Talk to me about the virtues of Rust when you actually have real experience.

According to the GitHub stats, I've added 293,494 lines of Rust code to Servo and 381,084 lines of code (mostly Rust) to the Rust compiler. I find that Rust's pointer ownership rules help improve the reliability and security of my code significantly.

Your Rust stats are irrelevant. You're literally the creator of Rust.

Outside of you, the majority of "users" of Rust are script-kiddies who think it's "cool" (like Haskell cool) and will likely never write any native application of any significance using it (or any low-level language for that matter).

Given that you seem to think that pcwalton is the creator of Rust, I'm guessing that your professed knowledge of the demographics of the Rust community is also entirely fantastical. Would you like to cite a source for your ad-hominem throwaway comments?
I think rust has its merits, don't get me wrong. I just think it has a large cargo cult following of inexperienced script kids who have never used it for anything other than pretending to know what they're taking about.
And what makes you think that?
I believe bringing up Rust in a discussion like this is completely warranted. After all, both Rust and C++ try to achieve similar goals (C++ also has a goal of maintaining backward compatibility with decades worth of code, which Rust doesn't yet have). Rust might not be quite there yet, but I believe the future is either Rust (or other similar language) becoming "mainstream", or C++ changing radically (and offering a "compatibility mode", perhaps).

    > Rust has been around for all 2-3 years now? 1.0 for what? Months? 
Rust as a project has been around for eight years in total, about twoish in a similar fashion to what it is today. It's been 1.0 for three months.
> C++ is for people who work on large mature codebases

Sure, C++98 or C++03.

While it's true that most people have to deal with lots of legacy code, as long as their compilers are up-to-date, it doesn't prevent them from using new language features.
In practice it often does, because introducing brand new patterns alongside existing ones may be frowned upon in a large project.

Consider a codebase that uses the "comment indicates ownership transfer" pattern everywhere. Would it improve the code quality if one developer suddenly introduced unique_ptr, std::move and rvalue references in just one place in the API, when every other call would still be using the old style?

To my taste, the mental overhead of having two different ownership patterns would outweigh the advantage of the new compiler checks (which in this case would be mostly theoretical, since the devs working on this project would presumably feel at home with the old pattern).