3 ms·
Can coffeescript generate asm.js compatible javascript? Or rather, what changes to coffeescript would be required to support it, I wonder?
by javajosh 14y ago
Can coffeescript generate asm.js compatible javascript? Or rather, what changes to coffeescript would be required to support it, I wonder?
- dangoor 14y agoCoffeeScript and JavaScript are semantically almost the same. CoffeeScript is not going to magically become faster because of asm.js. As I understand it, asm.js is really intended as a compiler target for languages with different semantics from JS that can achieve better performance by hinting more directly about what the machine should do.
- javajosh 14y agoAh, I see. That's why GWT would really benefit from asm.js but coffeescript would not: the Java-source already contains the extra type information (that is currently being mostly ignored), whereas Coffeescript is just as dynamic as native JavaScript. Not sure why I got downvoted for asking though. Oh well! Cheers.
- azakai 14y agoIt would need types, basically. That would be a big change for CoffeeScript, and doesn't feel like what the language is aiming for, so probably not relevant I suspect.