4 ms·
The main fallacy of this blog post is that he wants it to be one single programming language that replaces C. C has actually been already replaced mostly. C++,
by bhaak 8y ago
The main fallacy of this blog post is that he wants it to be one single programming language that replaces C.
C has actually been already replaced mostly. C++, Java, C#, Python, Ruby, Go, Rust, etc. have been chipping away for more than 20 years now at C's market share.
What kind of project can you seriously start today in C because there are no better options available?
My guess is embedded programming and kernel programming and for both of these usecases we feel the pain and would actually want something else.
> Yes, Rust is more safe. I don’t really care. In light of all of these problems, I’ll take my segfaults and buffer overflows.
Old C programmer yelling at clouds?
> Consider Go, which has had a lot of success in supplanting C for many problems. It does this by specializing on certain classes of programs and addressing them with the simplest solution possible. It hasn’t completely replaced C, but it has made a substantial dent in its problem space - more than I can really say for Rust
Go is IMHO a nice language and I would have been delighted to have it in the 90s. But nowadays it already feels outdated on arrival.
Lately I've been noticing more and more tools being developed with Rust. Some things take time, I wouldn't already write off Rust yet.
- Sir_Cmpwn 8y agoAuthor here. >The main fallacy of this blog post is that he wants it to be one single programming language that replaces C. That's not at all what I'm suggesting. In fact I thought this part of the article makes it clear that I feel the opposite way: >C is far from the perfect language - it has many flaws. However, its replacement will be simpler - not more complex. Consider Go, which has had a lot of success in supplanting C for many problems. It does this by specializing on certain classes of programs and addressing them with the simplest solution possible. It hasn’t completely replaced C, but it has made a substantial dent in its problem space - more than I can really say for Rust (which has made similar strides for C++, but definitely not for C).
- bhaak 8y ago> It hasn’t completely replaced C The keyword here is completely. Rust doesn't need to completely replace C, it only needs to cover those usecases other languages haven't already covered. Or maybe just some and a completely different language takes what is left. You don't care that Rust is much more safe than C due to all the features it has that are unlike C. But the safety aspect is Rust's main raison d'être. If you dismiss this outright, you could have written a much shorter article or at least written a much more interesting article by starting with this admission and from that working your way through Rust's feature and explaining how this doesn't alleviate the warts of Rust. > But now you know why we are still writing C I wonder who this "we" is? I'm also still writing C but for quite different reasons. Mostly because of legacy code and to some degree even just to be able to claim that I'm working on 35 year old code.
- bb88 8y ago> You don't care that Rust is much more safe than C due to all the features it has that are unlike C. But the safety aspect is Rust's main raison d'être. Rust is still young. I think it's a bit naive to proclaim the language of the future is here. Why? That was also the point of Ada until people realized that unhandled Constraint Errors could still crash missiles. https://itsfoss.com/a-floating-point-error-that-caused-a-damage-worth-half-a-billion/ https://itsfoss.com/a-floating-point-error-that-caused-a-dam... That was the point of Java until people realized that JRE's were full of security holes. https://www.cvedetails.com/vulnerability-list/vendor_id-93/product_id-19117/Oracle-JRE.html https://www.cvedetails.com/vulnerability-list/vendor_id-93/p... So, what's the point of Rust again? To protect us from all these security holes? Wasn't that also the goal of other languages? > I wonder who this "we" is? TIOBE says C is second most popular language after Java even with all the security holes. So there's a lot of "we" (though I don't code in C). https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/
- bhaak 8y ago> Rust is still young. I think it's a bit naive to proclaim the language of the future is here. I never claimed that Rust is the language of the future. I didn't say it directly but I think you can deduce it from my comments that I consider a multi language approach more sensible than using the same programming language for everything. Using Rust is more safe than using C. That's valuable. > So, what's the point of Rust again? To protect us from all these security holes? Wasn't that also the goal of other languages? Are you saying that just because Rust doesn't solve all problems it isn't worth having? You're also conflating stuff. The Ariane 5 explosion was not a programming error, it was a testing and specification error. The code worked exactly to the spec but the spec was for another piece of hardware. You can't use a fork and complain that it's not a good spoon. How about quantifying the bugs in the JRE against all the buffer overflows in similar C code? 600 CVE worthy bugs in 10 years doesn't sound like that much if you put it that way. https://www.cvedetails.com/product/19117/Oracle-JRE.html?vendor_id=93 https://www.cvedetails.com/product/19117/Oracle-JRE.html?ven... > TIOBE says C is second most popular language after Java even with all the security holes. So there's a lot of "we" (though I don't code in C). The TIOBE index has some issues. It is essentially counting hits for a search engine query for a specific language. I would rephrase it as "C has the second most webpages on the internet." On PYPL it is only the 6th popular language, although coupled with C++. Nevertheless there is still demand for C. Otherwise we wouldn't even have this discussion at all. But most people would rather see this demand decrease as we haven't been able to fix the language in the last 30 years.
- solarkraft 8y ago> But nowadays it already feels outdated on arrival Why? What do you prefer?
- bhaak 8y agoThat's certainly an opinionated opinion but Go feels like dragging C half-way to the 21st century. But unfortunately not all the way. Besides the very good concurrency support it doesn't feel much different than a polished and somewhat modernized C. Of course, depending on what you want that will be considered a feature not a bug. There's a reason so many C programmers jumped on it because even hardcore C programmers couldn't really ignore the language anymore. Also look at the project management. The drama about the package manager was hilarious bad PR. I wouldn't want to invest too much time into a programming language that can't even agree on a package manager and needs 4 different tries to arrive at a solution with potential security implications.
- empath75 8y agoI like that go feels sort of quaint and outdated. It makes it easy for pretty much everyone to jump in and contribute to a code base without having to learn too much. Rust is great, but it is not a language you can just jump into.
- picacho 8y agoin 90's single core golang probably won't be invented the way it is today :-p