3 ms·
> my conclusion was drawn from the following languages having their main compiler written in that language: Haskell, Java, Scala, OCaml, Kotlin, C++, C#, F#, Ru
by MaxBarraclough 6y ago
> my conclusion was drawn from the following languages having their main compiler written in that language: Haskell, Java, Scala, OCaml, Kotlin, C++, C#, F#, Rust, Go, Nim, Zig...
I don't see a problem, all those languages seem well suited to implementing a compiler. For comparison, the Bash scripting language would be a nightmare.
> Most of these compilers were rewrites after a bootstrap implementation was created in an existing language.
Sure, how else would they do it?
- atq2119 6y ago> Sure, how else would they do it? Write the very first version of the compiler for language X in X. Then hand-translate that compiler source to some other language or assembly. Then you don't ever have to rewrite the compiler.