5 ms·
Should We Limit Web Development to JavaScript?
- onion2k 11y agoThere's definitely something amiss with a language if there's a list that long of compilers/transcoders whose sole purpose is to avoid writing code in the target language. I don't think that's the reason why JS transpilers for so many languages exist. The reason isn't to avoid writing JS; it's to leverage JS's "runs in a browser" advantage. In fact, I don't believe anyone out there is writing code in one language and then compiling it to JS to run in production.
- fiedzia 11y agoSee typescript, coffescript and dart. They do exist only to avoid js and go around its issues. And a lot of people use them in production.
- onion2k 11y agoWhat you say is a very reasonable comment, there certainly are companies writing in one language and compiling to JS to run their code in production if you consider those languages to be separate to JS. I took the remark in the article to mean languages that have their own compiled (or interpreted) output that can also be transpiled to JS through mechanisms like emscripten. In my opinion TypeScript and CoffeeScript are effectively extensions to JS that pile on some sugar to fix what their respective authors see as JS's problems rather than being different languages per se. Not sure about Dart.
- fiedzia 11y agoWell, if you language works on js interpreter designed for js only, its hard to create very different language, so we fix what we can, hover small it is. For now tools like emscripten are incredibly unpractical and come with high cost that eats most of potential benefits. When we will have webassembly and ability to ignore js entirely, we will probably see explosion of significantly different languages being used. On the backend there is more and more functional ones, and formal verification is slowly getting traction, so probably this will propagate to frontend too.
- brudgers 11y agoTitle: Why Limit Web Development to JavaScript ?