3 ms·
Again, the evidence of this is rather slim. It's basically impossible to create safe, code in C as evidenced by the fact that nobody has every managed it. You'
by grabcocque 11y ago
Again, the evidence of this is rather slim. It's basically impossible to create safe, code in C as evidenced by the fact that nobody has every managed it.
You're making the mistake of assuming that because you know something really well, that makes it good.
- sien 11y agoNASA got 3.8 million lines of safety critical code written in C for the Mars Curiosity rover by 40 engineers in 5 years. It can be done. The talk on their coding standards, automatic code checking, code review and code coverage is well worth watching and listening to. http://cacm.acm.org/magazines/2014/2/171689-mars-code/abstract http://cacm.acm.org/magazines/2014/2/171689-mars-code/abstra...
- Kristine1975 11y agoBut C wasn't made for safe code, it was made as a replacement for assembly language to implement Unix in. And that it arguably did well ;-) Incidentally, according to Wikipedia, development of C started in 1972, the same year buffer overflows as a concept were first documented.
- EliRivers 11y agoUse the right tool for the job, given the circumstances. Sometimes, the trade-off of switching away from C is reasonable and C is the wrong tool for the job. Sometimes, there is literally no reasonable option other than C. Sometimes, it's a finer balance and one needs to apply thought and knowledge and experience. Use the right tool for the job, given the circumstances. Use the right tool for the job, given the circumstances. Use the right tool for the job, given the circumstances. I know I said the same thing repeatedly, but around here when claiming that C is sometimes the right tool, you have to state "Use the right tool for the job, given the circumstances" more than once, and there will still be people saying that there is no use for C ever ever ever and everyone should use {fetish language du jour}. I think the mistake you made was seeing your own concerns (safety) and assuming that because your needs require you to use something other than C, nobody should use C. I see this a lot in the programming world; people forget that they work in a tiny tiny tiny corner of the industry and assume their experience applies everywhere.