4 ms·
Why isn't using a language that has a growing community of young developers not a "reason"? They're looking towards the future and making the bet that it will b
by __jem 4y ago
Why isn't using a language that has a growing community of young developers not a "reason"? They're looking towards the future and making the bet that it will be easier to get new contributors in Rust than in C++. Maybe you disagree with the prospective future of C++, or the feasibility of rewrites, but it hardly seems like "not a reason" to peruse something like this, it seems like a pretty strong one, since as you say "finding good C++ devs is hard" and they're interested in growing the number of contributors in the future.
- dmitrygr 4y agoBecause, while the sequence "100,000 100,000 100,000 100,000" is stable and "1 2 3 4" is growing, that does not mean that the latter will eclipse the former anytime soon - the point being implied by TFA
- __jem 4y agoI seriously doubt there are 5 orders of magnitude more C++ open source contributors actively participating in projects on GitHub than Rust, which is the relevant question. Enthusiasm counts for projects like this that are looking to stay relevant.
- fbdab103 4y agoAt this point, I would love solid numbers on the number of new C++ projects (open source or otherwise) vs Rust. Google just came out indicating how well the transition was working for them with respect to memory vulnerabilities.
- zozbot234 4y agoC++ is simply not intended for new projects in this day and age; even Carbon and cppnew are specifically designed for projects that must interoperate heavily with C++ libraries, and are thus not entirely greenfield in that sense. The Carbon developers have explicitly made it clear that new projects should be written in a safe language if at all viable.
- yazzku 4y agoI am watching the Carbon talk now. Successful language transitions have happened in the past when the new language is fully and easily interoperable with the old one. How easy is it to add Rust to a C++ code base? If the answer is 'not at all', then the transition is unlikely to happen anytime soon (it hasn't happened in the decade that Rust has been around). "New projects should be written in a safe language" -- what about the existing ones? Your memory safe web server isn't very useful when it's sitting on top of a kernel tcp/ip stack RCE vulnerability.
- steveklabnik 4y agoEarly on, Rust’s goal was to improve Firefox, a large C++ codebase. A bunch of language design decisions were made to ensure this could work well. However, that doesn’t mean it’s always super easy. C++ interoperated with C even more easily: just compile your code with the new compiler! With Rust, it’s more like FFI. https://cxx.rs/ https://cxx.rs/ is at the forefront here. > it hasn't happened in the decade that Rust has been around This seems to imply that no C++ codebase has had Rust added to it. This is not true, just to be clear, there are. Firefox, for example. Chrome soon. All kinds of things. I also may have misunderstood you!
- zozbot234 4y agoIf cxx.rs is at the forefront, I'd describe autocxx and crubit as being at the bleeding edge. But they hold the promise of significant improvements in interop between Rust and C++.
- steveklabnik 4y agoYeah, they’re very exciting too! I should start including them as well when I talk about this, thanks :)
- lmm 4y ago> "New projects should be written in a safe language" -- what about the existing ones? Your memory safe web server isn't very useful when it's sitting on top of a kernel tcp/ip stack RCE vulnerability. The best time to start rewriting everything in an ML-family language was 20 years ago; the second-best time is today.
- steveklabnik 4y agohttps://madnight.github.io/githut/#/pull_requests/2022/4 https://madnight.github.io/githut/#/pull_requests/2022/4 This can show you certain data. I’ve linked to Q4 2022, specifically PRs opened. You can see C++ at #4 with 9.7% of PRs, and Rust at 14 with 1.6%. Rust users are also going to be biased towards GitHub over other places.
- mlindner 4y agoThe tremendous drop in javascript over 2021 is very interesting.
- steveklabnik 4y agoI'd assume that's a massive shift to TypeScript, but yep!
- legends2k 4y agoRespect for providing data and being centered despite being a core Rust dev.
- steveklabnik 4y agoThank you. To be clear, I am not involved with the development of Rust anymore.
- deleted 4y ago[deleted]