3 ms·
It's because a compiler is supposed to be high-level to low-level; you already have a lower-level language to write in it, and not a higher-level one. Writing a
by userbinator 6mo ago
It's because a compiler is supposed to be high-level to low-level; you already have a lower-level language to write in it, and not a higher-level one. Writing a C compiler in a higher-level language than C is going backwards.
E.g., Pascal compilers have traditionally been written in Pascal, hardly a language which conjures up a "low level" image.
How could the first Pascal compiler be compiled if it was written in Pascal, but a Pascal compiler didn't yet exist?
- groos 6mo ago> How could the first Pascal compiler be compiled if it was written in Pascal, but a Pascal compiler didn't yet exist? Therein lies the magic of bootstrapping a language compiler written in the same language. Look it up.
- userbinator 6mo agoYou need a different compiler to compile the first one. You are the one who needs to "look it up".