3 ms·
C and C++ have both passed the threshold of immortality. There's so many billions of lines of code in both those languages that the likelihood of either of them
by grabcocque 11y ago
C and C++ have both passed the threshold of immortality. There's so many billions of lines of code in both those languages that the likelihood of either of them ever disappearing is very slim.
The question is about new development, and to what extent C and C++ are evolutionary dead ends. Nobody would design a language like C today, would they? They'd be laughed at.
- EliRivers 11y agoThey'd only be laughed at because they were accidentally recreating C and it'd be easier to just use C. C itself is a great language doing the job it was made for very well.
- grabcocque 11y agoAgain, 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.
- rkangel 11y agoThis is one advantage D has - it provides a path for gradual migration. It integrates so well with C and C++ that you don't need to throw away all th eold code and start again, you can do new devlopment on your existing project in D without too much pain.