3 ms·
> We do see (3) with Typescript and Coffeescript And ClojureScript, and PureScript, and Elm, etc Honestly, in my hobbyist experience, JavaScript is a joy to u
by brundolf 5y ago
> We do see (3) with Typescript and Coffeescript
And ClojureScript, and PureScript, and Elm, etc
Honestly, in my hobbyist experience, JavaScript is a joy to use as a compilation target. All the flexibility and the laundry list of features which can make it a handful to use directly, make it a wonderful base for nearly any kind of language you can imagine. And because it's higher-level, you can focus your energy on your own language instead of on re-implementing the fundamentals from scratch. And then of course it performs better than most similarly-flexible languages, and runs anywhere.
- goatlover 5y agoWebAssembly is a much better target for compiled languages. And JS runs anywhere in the same way that Java does, which is wherever someone has installed a virtual machine for it, which is usually a web browser or Node for JS. But it doesn't run on more places than C or C++, which can be compiled to run on almost any hardware in existence.
- brundolf 5y ago> WebAssembly is a much better target for compiled languages Depends on what you're trying to do. My language projects are almost always higher-level and garbage-collected, so again, targeting WASM would mean re-implementing fundamentals from scratch all the time. I'm glad to focus instead on interesting language features, translating those to be in terms of JS features.