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?

  • Ephera
    link
    1
    edit-2
    2 years ago

    I should probably add, though, that obviously at the end of it, I did not write a new programming language. That is still a rather large endeavour.

    But I certainly considered it.
    Even just a Rust pre-processor might solve some of my problems, though it would probably create new problems, too.