3 ms·
at least two reasons come to mind: simplified bootstrapping and being a testcase and a source for feature requests for the language itself (especially important
by gpderetta 6y ago
at least two reasons come to mind: simplified bootstrapping and being a testcase and a source for feature requests for the language itself (especially important early on when there are few large codebases in that language).
- pharmakom 6y agoIs it a good test case though? If the language is designed for writing compilers then sure, but I imagine most people using TypeScript (for example) just want to write full-stack web applications.
- MaxBarraclough 6y agoI agree that TypeScript isn't an obvious choice for writing a compiler, but self-hosting still has advantages. It tests out the language at scale, and there's the 'dogfooding' aspect that the compiler developers use the language they created (although as you say they're using it for an unusual purpose).
- pjmlp 6y agoDepends, https://www.infoworld.com/article/3436840/microsoft-proposes-static-typescript-for-embedded-systems.html https://www.infoworld.com/article/3436840/microsoft-proposes... https://www.microsoft.com/en-us/research/blog/rocket-fast-embedded-typescript-for-makecode-arcade/ https://www.microsoft.com/en-us/research/blog/rocket-fast-em...
- wrycoder 6y agoWirth (Pascal, Modula, Oberon) believes that the best performance test for a compiler is how fast it can compile itself.
- MaxBarraclough 6y agoI'm not sure that really stands up. Assembly languages would always win, no? Forth would also do very well.