5 ms·
As someone who works in the web space, albeit on the back-end, can anyone explain why a project like this is desired over a better language / run-time?
by cauterize 11y ago
As someone who works in the web space, albeit on the back-end, can anyone explain why a project like this is desired over a better language / run-time?
- jfb 11y agoI guess the argument boils down to "path dependence". We're highly unlikely to get any language environment other than Javascript, so mutate Javascript to try and strong-arm it into something better.
- richdougherty 11y agowasm and asm.js are perfect examples of incremental improvements rather than building something from scratch. The benefit of this is that incremental improvements can be built slowly on top of existing deployed JavaScript engines, whereas writing something from scratch has a serious bootstrapping problem. The wasm/asm.js story goes like this so far: 1. emscripten, a JavaScript backend for LLVM, demonstrates that you can "compile" C/C++ code into JavaScript. 2. Some vendors start writing specific optimisations for emscripten-style JavaScript code. 3. This is formalised into a subset of JavaScript called asm.js. 4. More browser vendors get onboard with asm.js optimisations. 5. wasm is proposed. Initially it is a compact binary format that is equivalent to asm.js and that can be trivially translated into asm.js at runtime using a polyfill. The future might look like this: 6. Browsers adopt wasm natively, so the asm.js shim can be dropped, giving more performance benefits. 7. Further enhancements to wasm follow and wasm perhaps begins to diverge from its underlying JavaScript runtime. 8. ???
- cpeterso 11y agoHow long until someone implements WebAssembly instructions in hardware? ARM's "Jazelle" supported some JVM instructions in hardware.
- h1282227 11y agoHardware support only makes sense if the optimisations are already included in the compiler output. The JVM does all the optimisations which makes Java Bytecode not suitable for that purpose.
- aikah 11y ago> this is desired over a better language Some people say Javascript is the best language , you see the problem ? nobody will ever agree on what "a better language" means. JavaScript is constrained by forward compatibility. The goal here is to let people choose the language they want to develop with. The APIs will stay the same, and that's what matters. Front end development shouldn't be about knowing Javascript ninja tricks, but web and DOM apis.
- dorfsmay 11y agoThe idea of a good language evolves over time, and varies among people. Look at how many languages transpile to JavaScript today. If you ask the users of those languages, they'll tell that their language is the "better language" you're looking for.
- TimJYoung 11y agoYep, I wrote a blog post about this not too long ago: http://www.elevatesoft.com/blog?action=view&id=why_limit_web_development_to_javascript http://www.elevatesoft.com/blog?action=view&id=why_limit_web... From the post, there's this very illuminating link that I'm sure most here have already seen: https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-JS https://github.com/jashkenas/coffeescript/wiki/list-of-langu... That's a pretty long list. :-)
- dorfsmay 11y agoThanks, I hadn't even realised the scope of it, I really thought there was a dozen of them. This link is worth its own posting!
- deleted 11y ago[deleted]