Do you write the first compiler in another programming language? And the fully rewrite the compiler once the first compiler is mature enough to produce reliable builds, compile the new compiler on that first compiler, in order to have a compiler that is written in the same language as the one it’s compiling?

If this is the case, and this might be a stupid question, why would want to? You’ll essentially be throwing away potentially years of work on that first compiler just to have a circularly compiling programming language? What benefits could this have to make the extra effort worth it?

  • @blank_sl8
    link
    82 years ago

    You don’t spend years building that first compiler. You make it very minimal. Then you use a really minimal version of your language to develop the compiler for a slightly more powerful version of your language. Which you then use in turn to make even more powerful versions. The very initial compiler would probably take a single talented programmer less than a week to make.