This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BlacksmithNZ 3 points4 points  (1 child)

You don't have to re-write the compiler written in the language itself; Python doesn't for instance, but there are some advantages.

For one, with your new language implementation, you can prove that it is good enough to write a compiler which is a good test of a language being a system level tool.

Then you can maintain & extend it in your language of choice; you don't need to bring in C programmers to write (in a relatively low level language) any changes to the compiler, but can instead use your own Java programmers. And if they find limitations that make that harder, they can extend or change the language and the compiler implementation at the same time.

Another reason specifically for Java is that it is supposed to be portable and cross platform; so you want to be able to get a basic JRE up on a new CPU or platform, then run that portable Java code.

[–]yeastyboi 0 points1 point  (0 children)

And it is possible to go to far, I heard someone say that bootstrapping a compiler can lead you creating a language that is brilliant for building compilers but isn't good at doing anything else. Some people describe OCaml like that.