Hacker News new | past | comments | ask | show | jobs | submit login

That the Godot scene editor is made with Godot seems to be an excellent example of how eating one's own dog food can exercise and improve the basic technology.



It's fairly common practice in compilers (for good reason), i.e. the D compiler is now written in D and the Rust compiler is written in Rust etc. I think the first Haskell compiler was written in Miranda but that's before my time.

You get to test the product without waiting for feedback from the real world and you also end up with a test suite (in effect) for free.


How do compilers compile themselves before the first iteration? This always confused me


You 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.


The first C compiler was written in BCPL IIRC, the D compiler was written in C++ up until about 2016-ish


I figured someone would point out that I missed a few steps ;)

The explanation of how a compiler can be implemented in its target language still holds though.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: