3 ms·
No, asm.js is not readable, and doesn't look like C nor even typical JS. Due to very limited set of expressions available it's too hard to write by hand (e.g.
by pornel 13y ago
No, asm.js is not readable, and doesn't look like C nor even typical JS.
Due to very limited set of expressions available it's too hard to write by hand (e.g. no objects, casts required everywhere, one flat array representing memory), so all non-trivial asm.js programs are spit out by compilers that treat it like assembly and preserve very little structure of source programs.
- wwwtyro 13y agoThis Q/A from the asm.js FAQ appears to disagree with you: Q. Is asm.js a new language? A. No, it's just (a subset of) JavaScript. An asm.js program will behave identically whether it is run in an existing JavaScript engine or an ahead-of-time (AOT) compiling engine that recognizes and optimizes asm.js—except for speed, of course! Also, the examples in the spec are completely legible. It looks much like C, in fact.