4 ms·
I'm just curious why can't they use C or C++ instead of Rust
by mraza007 6y ago
I'm just curious why can't they use C or C++ instead of Rust
- cletus 6y agoCompile time memory safety? Unless you have an existing code base or a necessary integration or requirement that demands it, I honestly wouldn’t start a C/C++ project in 2021 all other things being equal.
- jeffbee 6y agoBecause nobody would upvote that on HN. The HN zeitgeist of programming languages is absurdly biased. In actual industrial practice the dominant languages are Java, C++, C, C#, Python, Javascript, dozens of things people rarely discuss like matlab, VB, delphi, a bunch of other shit, and way, way down at the bottom, Rust, and then about fifty other languages, and finally Erlang. It's ten times easier to find a job writing MIPS assembly code than to find one programming in Rust, but nobody wants to blog about that.
- jacksnipe 6y agoIn actual industrial practice, most YOUNG C++ developers I know would love to be able to work with Rust at work.
- jeffbee 6y agoThere's a lot of territory between what one wishes to happen at work, and what actually happens at work.
- jacksnipe 6y agoRight, I'm just saying that the HN zeitgeist is -- at least in this case -- reflecting a real belief. It's what people want to work with, not what currently is run everywhere in production; and what developers want to work with definitely matters. Discord rewrote this service in Rust because they had already had success using Rust for some performance critical services; it seems likely that they chose to invest in Rust and not C++ for those services because their developers pushed harder for or were more interested in Rust.
- jeffbee 6y agoExactly, which is why my original responses to this year-old blog post was "Why did we switch to Rust: because we wanted to". The blog post should focus on those social aspects, not invent tenuous technical back-justifications.
- jacksnipe 6y agoI don't think C++ is a compelling choice over Rust if you don't already have a lot of C++ experience in your organization. C++ is way harder to learn than Rust, IMO, not because of any set of language features or footguns, but because the ecosystem, tooling, etc... is just so different from what most "modern" devs have come to expect. C just doesn't offer the same feature set at all.
- mraza007 6y agoI see but C++ is widely used and you can easily find C++ devs compared to Rust. This brings me to my next questions C++ has been there for a long time compared to Rust but still people decide to go with Rust Just curious to know
- jacksnipe 6y agoIt seems like Discord wasn't about to hire new developers for this, they wanted to use their existing talent. In that case, what matters is how easy a new language is to learn, not hire for. Also, good C++ devs are decidedly not easy to come by. Especially when you get into performance sensitive work, they can command huge salaries; and a bad C++ dev can do more damage to a codebase than any other language I know of.
- mraza007 6y agoGot it, You explained it really well !!
- nilkn 6y agoIntroducing C or C++ into an org with no expertise in them feels much riskier than introducing Rust. All three are difficult languages but at least with Rust you have Cargo and memory safety by default. I’ve seen smart folks burn days just setting up dependency resolution and builds for C++ stacks. Experts don’t have that problem but a team that has never used it professionally very well might.
- DC1350 6y agoIt doesn’t look as good on a resume. There’s thousands of people with decades of experience in C or C++ that you need to compete with for clout. It’s easier to invent your own problems so you get to be the best man for the job.
- unethical_ban 6y agoI think you're being downvoted for pushing a narrative (somehow C langs are better than Rust) without providing your opinion or evidence. It baits people into defending Rust without you doing any work to defend your position.