I am exposed to C due to embedded system programming, and I think this is one great language in this area.
Yes. This is better than Java.
However, why is it used to write compilers?
This question cannot be answered without asking the developers. I suspect most of them will tell you that ordinary compiler writing software (yacc, flex, bison, etc.) generates C code.
If the reason for gcc is that there are not many good languages, there is no excuse for the clan.
GCC is not a programming language, nor is it a Clang. They are both implementations of the C programming language.
Is it for performance reasons?
Do not confuse an implementation with a specification. Speed is an attribute introduced by your compiler and computer, not a programming language. GCC creates fairly efficient machine code that can influence developers to use C as their main programming language ... but in ten years, it * can be such that node.js is more efficient machine code than GCC. Don't forget that Stackoverflow is forever.
* could, but most likely will not. See Ira Baxters comment below for more information.
Mostly interpreted languages are slightly slower compared to compiled languages, but I think the difference is almost negligible in CoffeeScript (JavaScript), due to node.js.
Similarly, interpretation or compilation is not a choice of language, but an implementation of the language. For example, GCC and Clang choose to compile C into machine code. Ch and CINT are two interpreters that translate C code directly to behavior, and not to machine code. Java was once primarily translated using interpretation, but now it is mostly compiled into JVM bytecode. Javascript seems to be phasing into the prevailing compilation. Who knows? You may see compilers written primarily in Javascript in ten years ...
From the point of view of the developers, I believe it is much easier to write a single compiler using high-level languages.
All of these programming languages are technically high. They are mainly defined in terms of an abstract machine; They are, of course, not low.
Unfortunately, most compilers are written there in C / C ++.
I do not find it annoying that C ++ is used for writing software; This is not a bad programming language.
Is this just due to outdated code?
I believe that outdated code may affect a programmer’s decision. In the end, although, as I said, you have to ask the developers. They may simply decide to use C or C ++ because C or C ++ is their favorite programming language ... Why do you speak English?