Hacker News new | ask | show | jobs
by xvilka 2323 days ago
There is no reason to spend time on any variant of C in the age of Rust.
3 comments

Sure there is, as much as I dislike C, no one is going to port the existing UNIX and POSIX clones to something else.

And even then, many of those interfaces are based in C semantics anyway.

So anything that helps to reduce the amount of possible security exploits per line of C code is welcomed.

For new projects, sure. For existing projects, it's not trivial to convert them and anyone working on something significant is going to need time to do a migration during which additional new C code will almost certainly need to be written.
It can be semi-automated with the amazing c2rust[1] tool.

[1] https://github.com/immunant/c2rust

“semi-” is not a synonym for “easily done with production-ready results”. Until that changes, people are going to need to write new C code even if they're working to refactor their code into a better language.
Good point. We can do this in Go.