9 ms·
C has been "losing ground" not because of random per peeves of those who never wrote a line of code in C but because since C's last standard update there have b
by rumanator 6y ago
C has been "losing ground" not because of random per peeves of those who never wrote a line of code in C but because since C's last standard update there have been other programming languages that offer developers something of value so that the trade-off between using C or any alternative starts to make technical sense.
It also helps that C's standardization proceeds in ways that feel somewhat between sabotage and utter neglect.
Meanwhile, C is still the absolute best binary interop language devised by mankind.
- shakow 6y ago> Meanwhile, C is still the absolute best binary interop language devised by mankind. You're mistaking the “C” ABI with the C language. The so-called C ABI should actually be called the UNIX-derived ABI, as (i) C doesn't define an ABI and (ii) C can perfectly produce binaries using another ABI (such as e.g. the “Pascal” one, common on the DOS platform).
- chromatin 6y agoLol at “never wrote a line of code in C”. Surely you are not addressing the article’s author?
- ratww 6y ago> C has been "losing ground" not because of random per peeves of those who never wrote a line of code in C This is not a random pet peeve, and WalterBright is as far as you can get from someone "who never wrote a line of code in C". This is the cause of numerous security bugs in the past and currently, and the reason most C material written in the 70s/80s is unsafe to be used today (mostly due to usage of strlen/etc vs strnlen/etc).
- WalterBright 6y agoFrankly I never would have made the proposal if I didn't love C. I've made proposals to add D features to C++, too.
- ratww 6y agoA question: since your company also makes a C/C++ compiler (and the repo has very :), have you considered adding this addition to it, as an experimental feature, perhaps to demonstrate its usefulness to other developers and standard bodies? (Although, now that I think of it, D itself might serve the same purpose)
- WalterBright 6y agoI don't see much point in it. I've proposed this change to C in front of several audiences, and it never received any traction. If you want to experiment with it, you can use DasBetterC, i.e. running the D compiler with the `-betterC` switch, which enables programs to be built requiring only the C Standard Library. Fair warning - once you get accustomed to DasBetterC, you're not likely to want to go back to C :-)
- ratww 6y ago> If you want to experiment with it, you can use DasBetterC, i.e. running the D compiler with the `-betterC` I've been meaning to experiment with DasBetterC for a while, and I have a project C I've been wanting to migrate to something with proper strings (it's an converter for some binary file formats, but now I want it to import some obscure text formats too). Maybe that's the push I needed :) After 20 minutes and about 250 out of 2098 lines converted, the error messages are very good and give very nice hints about what to change, I must say I prefer them to Rust's verbose messages.
- WalterBright 6y agoGreat! DasBetterC's trial-by-fire was when I used it to convert DMD's backend from C to D. I'm sure you already know this, but the trick to translating is to resist the urge to refactor and fix bugs while you're at it. Convert files one at a time, and after each run the test suite. Only after it's all converted and passing the test suite can refactoring and bug fixing be considered.
- 6y ago
- boring_twenties 6y agoPro tip: Google the name of the person before responding to them, it can help avoid the taste of foot in your mouth which you are currently experiencing.
- datman347 6y agoAnyone that has to rely on their name for an argument isn't worth listening to.
- kortilla 6y agoYou misunderstand what the conversation is that’s occurring. The parent implied the person had never written C.
- datman347 6y agoHe never said explicitly, he was just making a general statement. Not that it matters whether he did or didn't, there's a lot of things wrong with C, it will most likely eventually disappear, but not for reasons outlined in this article. That's what he was saying.
- leptons 6y agoSomeone once said COBOL would disappear. C will still be used long after you and I and everyone here have returned to dust.
- xmprt 6y agoTry becoming a COBOL developer and see how that works for you. Likening C to COBOL isn't doing it any favors.
- boring_twenties 6y agoWhat's the implication here? I only know one COBOL developer but they seem to be doing quite well for themselves, making over $400k a year for something like 15 hours of work a week.
- asveikau 6y agoMaybe people are voting this down because they think it's directed at Walter Bright in particular, but I think there is actually some truth in the harsh comment. Nothing about Walter Bright in this statement, but some of the harshest criticisms from others I have seen of C are not from expert practitioners in C. People who are experts and also critics seem to have a more practical, realistic, nuanced critique, that understands history and challenges to adoption, admits that the long history and difficulty of replacing C isn't exactly for no reason.
- higerordermap 6y agoMaybe they thought it was yet another ruby rails webshit that recently learned rust.
- Gibbon1 6y agoThat's the way I interpreted it because it's true. A lot of the criticisms are misdirected one by people that haven't used C except being forced to use it for few assignments in school, C++ jockeys that think C is the 30 year out of date version of C that's supported by C++, and people that haven't used it at all for anything real. I also agree that what the standard committee has been doing for the last 20 years amounts to willful sabotage.
- pjmlp 6y agoSo what the improvements between C89 and C18 in regards to UB and security, for any ISO C compliant compiler?