Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

asmjs is a transpiling solution. No one is going to rewrite UnityEngine in hand-written asmjs. The vast majority of asmjs code is going to be transpiled, you can literally see it in the name: asm


I think by a "transpiling solution," he means something that is transpiled from (like coffeescript or dart), as opposed to something that is transpiled to, which is asm.js.

The problem with transpiled languages is that each transpiled solution is just one language. Many of them are nice, and almost all of them are improvements on JavaScript, but they're still just languages. Asm.js basically lets you use anything you want, which is an entirely different category of solution. In particular, it lets you use languages that already exist, for which you have experience and tools and libraries and standards and whatnot.


Yes, it is a transpiling solution, but it's one that's a subset of JavaScript. This means it's compatible with all JS engines and lives in the same ecosystem.

It's quite different from, say, NaCl or Dart, which introduce a completely new language with a new set of APIs.


Dart the platform is compatible with all JS engines, Dart2JS.

I could rightly claim that DartVM is just a specialized two-stage compiler that kicks in to give a speed boost.

Compatible != portable. In the real world, performance matters. If I deploy my new triple-A game to the Web, and I'm only going to get 60fps on 25% of the browsers, and 15fps on the rest of them, do I really consider it the same ecosystem?


> If I deploy my new triple-A game to the Web, and I'm only going to get 60fps on 25% of the browsers, and 15fps on the rest of them, do I really consider it the same ecosystem?

This was always an issue on the web. Browsers have always had speed differences on that scale - either due to browser optimizations, or running on much weaker hardware (a phone vs. a powerful desktop). We've never had consistency the way consoles do, which is why AAA games run best there.


> Dart the platform is compatible with all JS engines, Dart2JS.

Not quite. Most of Dart (though not all) can compile to JS, and you can then use the JS version or the Dart version depending on browser support. That doesn't mean existing JS engines can run Dart code, it's just you can choose to fall back to Dart compiled to JS.


NaCl was basically trying to open web to any language.


So is asm.js.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: