4 ms·
Not gonna happen. We need close to the metal tools for a whole pile of things, and that's not going to change. If anything, tools to help write C, or find err
by ddingus 12y ago
Not gonna happen.
We need close to the metal tools for a whole pile of things, and that's not going to change.
If anything, tools to help write C, or find errors, test, etc... are the more likely path.
That said, we could reduce the number of use cases for C now, and not lose too much, but that's not going to be the death of it by any means. More like a rational pruning.
- lvh 12y agoDid you read the article? It agrees with you, and suggests Rust as a best-of-both-worlds option.
- ddingus 12y agoYes I did, and interoperating with C isn't the death of C at all. My statement "That said, we could reduce the number of use cases for C now" covers the, "let's work with C and write more things in Rust..." scenario being proposed. To actually replace C, whatever it is will have to be capable of something like the Linux Kernel, and make low level driver authors happy. Even there, C still works with assembly language.
- Sanddancer 12y agoThere are still a lot of places where Rust isn't useable, especially when you're talking about things like embedded processors. Rust on the AVR, for example, requires very specific versions of llvm and clang to work, and even then, you have to write all of your IO code in a separate library, most likely in C. And it just rolls downhill from there. Wanna support the V850 that's found in a lot of automotive control systems? Nope. Rust doesn't quite have the ability to get down and dirty to do the kind of register tweaking you tend to do when you're using a processor with lots of IO you need to manage.
- copsarebastards 12y ago> If anything, tools to help write C, or find errors, test, etc... are the more likely path. Ugh, as if we haven't been going down this path for three decades. We're still getting shit like heartbleed. When can we admit that path doesn't work and start trying other things?
- xamuel 12y agoHeartbleed is a symptom of bad programming, not a bad language. C is "less secure" because it allows the programmer to do possibly-unsafe things at their own discretion. The alternative is to flat-out ban those things. Which is appropriate for some use cases (the kind where performance doesn't matter). Inappropriate for others (the kind where performance does matter).
- zacharycohn 12y agoThis is what designers think about all the time. How can a tool be designed so the unknowing user can't accidentally do something bad? Heartbleed didn't happen on purpose, it was an accident. If you place all of the responsibility on the developer to catch, and be aware of, all possible weaknesses and attack vectors... Well you get today, that's what.
- copsarebastards 12y ago> Heartbleed is a symptom of bad programming, not a bad language. Okay, so your claim is tantamount to "every major C program is badly programmed", because every major C program has memory related bugs. If it's really bad programming, not a bad language, why is it that C is so much more often poorly programmed than, say, Python? If it's C programmers, not the C language, then we should avoid C because that's the easiest way to avoid these terrible C programmers. > C is "less secure" because it allows the programmer to do possibly-unsafe things at their own discretion. The alternative is to flat-out ban those things. That's not the only alternative, you're just ignorant of the alternatives.
- xamuel 12y ago>why is it that C is so much more often poorly programmed than, say, Python? It's kind of like saying: trauma surgeons must be more dangerous than pediatricians, because so many more patients die in the care of a trauma surgeon than in the care of a pediatrician. It ignores the fact that you wouldn't send a pediatrician to such a difficult patient as you'd send a trauma surgeon to. You wouldn't use Python in a lot of the places you'd use C because the performance would be "shaggy puppy meets Godzilla" lousy. >That's not the only alternative Suppose I've established that the fastest way the computer can do X involves having the CPU (which only knows machine code, no magical languages) access a memory location without checking if it's in bounds. Either the language allows me to program that, or it doesn't. If it does, then Heartbleed-like bugs are possible. QED. Alright, there's technically one other alternative, require the programmer to formally proof-verify that the code does as it's supposed to. I hope that this will become more practical within my daughter's lifetime (it probably won't within mine).