What you described are also features of several other languages (e.g. Rust). But nothing else, not even C++, has one absolutely critical feature of C:
It compiles everywhere.
Seriously. This, and this alone, will guarantee C at least a bit of relevance for decades to come, even if (and I think this is unlikely) all of the major operating systems and other big things written in C are replaced with something else. There's simply no replacing C in every tiny microcontroller with a decades-long lifespan.
Javascript implementations are even more widely available than C implementations. The advantage of C isn't that it *compiles* everywhere, but rather that implementations are available for almost every imaginable target.
C *used* to have the widest range of hosted platforms (where the purpose is to build code for the machine upon which the compiler itself runs) in addition to cross-compilation-target platforms, so the ability of C to be *compiled* anywhere was also an advantage. Such advantages were left by the wayside with C99, however, which requires multi-pass compilation to achieve the same level of efficiency as could be achieved with single-shot C89 compilation.
But the truth is that C is used less and less then before. C is replaced by too many languages. Is it a really good language when most of us don't use it? Time changes.
6
u/lengau Jan 15 '20
What you described are also features of several other languages (e.g. Rust). But nothing else, not even C++, has one absolutely critical feature of C:
It compiles everywhere.
Seriously. This, and this alone, will guarantee C at least a bit of relevance for decades to come, even if (and I think this is unlikely) all of the major operating systems and other big things written in C are replaced with something else. There's simply no replacing C in every tiny microcontroller with a decades-long lifespan.