Live data from Hacker News

Rust is not a good C replacement

drewdevault.com

1–10 of 213 posts

Re: Rust is not a good C replacement

#2
There's a lot of stuff I could say here, but I'll stick to

> Attempts to integrate it with other build systems have been met with hostility from the Rust & Cargo teams.

This is very much not true. We've put in a ton of work to support this. Arguably, we've put in too much design work and not enough implementation work; we've had a few different attempts at making this work even better than it does today, and we haven't finished them up. But this is very much something that is cared about and desired by the team.

It was literally on the 2017 roadmap: https://blog.rust-lang.org/2017/02/06/roadmap.html

> Rust should integrate easily into large build systems. Plans include working with large companies incorporating Rust to understand how best to equip Cargo to smooth the process.

I don't know how this is framed as "hostility".

As one example of the work done here: https://github.com/rust-lang/cargo/issues/5579

Re: Rust is not a good C replacement

#4

There's a lot of stuff I could say here, but I'll stick to > Attempts to integrate it with other build systems have been met with hostility from the Rust & Cargo teams. This is very much not true. We've put in a ton of work to support this. Arguably, we've put in too much design work and not enough implementation work; we've had a few different attempts at making this work even better than it does today, and we haven…

Thanks for sharing your perspective. My comment was largely based on this discussion:

https://github.com/mesonbuild/meson/issues/2173

If you'd like to share a short summary of your thoughts, I'll update the article with your commentary.

Re: Rust is not a good C replacement

#7
The converse is what I've heard with people at REN-ISAC and whom write and coauthor RFCs. (I'm not one, but trust the comments they've made to me regarding this.)

For a new dev to start writing internet-quality code, with C/C++ takes 10 years before they can make reliable code. The procedure takes what amounts to a journeyman style one-on-one until proficiency, 10k / 10 years later.

With Rust, it takes 2 years for a new developer to attain proficiency.

To me, those numbers are the ones that matter. Rust is stable and good, and gets out of the way of the developer... and gets in the way of the developer when coding anti-patterns.

Re: Rust is not a good C replacement

#8
> But now you know why we are still writing C, and hopefully you’ll stop bloody bothering us about it.

I don't think anyone will stop bothering them about it until C software security improves. Microsoft found that 70% of security bugs in their software were memory safety issues:

https://www.zdnet.com/article/microsoft-70-percent-of-all-se...

Languages like Rust are making an effort to address these issues. What's the roadmap for reducing the number of security flaws in C software?

Re: Rust is not a good C replacement

#9
OK looking Just at the number of features seems disingenuous. Cpp features tend to idk, increase the level of complexity as there tends to be quite a bit of friction between them. Rust features definitely “work together”.

This post seems to have started with a conclusion and worked backwards.

Rust is such a breath of fresh air. Cargo is nuts. The community is nuts. I’ve been writing rust full time for a couple of months now and I’m not going back.

Post reply on HN