3 ms·
How do compilers compile themselves before the first iteration? This always confused me
by Jowsey 7y ago
How do compilers compile themselves before the first iteration? This always confused me
- Doxin 7y agoYou compile the next version of the compiler using the previous version. That does mean that the first version of the compiler cannot be written in the target language. Once you've got that working you can write a new compiler in the target language and compile it with the previous compiler. Back in ye olden days the first assembler was written in machine code. The first C compiler was written in assembly, and the first D compiler in turn was written in C.