4 ms·
How is it a better codegen target than any other language? That's not intended with an argumentative tone- I'm genuinely curious as to what you mean.
by ragnese 3y ago
How is it a better codegen target than any other language? That's not intended with an argumentative tone- I'm genuinely curious as to what you mean.
- VyseofArcadia 3y agoIt's only a half-informed thought. I work on a project that compiles a domain specific language to C and C++. When I think about JavaScript as a codegen target, all I can see is all the problems I wouldn't have.
- anon291 3y agoJavascript benefits from the major efforts put into its JITs. No other scripting language really has that.
- marcosdumay 3y agoHum... A lot of people is working on JS codegen, so there are all kinds of knowledge bases, libraries, and standards for it. Also, JS itself got some changes to support it better. So, yeah, it's a better target than most general purpose languages. It's surprisingly simple to generate, much simpler than to write on. It is also a worse target than most languages specialized on being generated.