News for hackers. Stuff that matters.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by kybernetikos on Tuesday October 15, 2013 @12:56PM (#6554534)
I want "use asm" as a way of getting extra 'compile time' checking.

If I say "use asm" and do something that isn't optimizable by mistake, it should give me an error rather than silently falling back to slow code.

Re:“The 'use asm' pragma is not necessary to opt into optimi... by aegiso on Tuesday October 15, 2013 @01:14PM (#6554683)
That's all very nice, but it ain't gonna happen because of backwards compatibility. One of the main points of asm.js is that it runs everywhere the same as plain JS, whether the platform knows about asm.js or not.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by reubenmorais on Tuesday October 15, 2013 @01:24PM (#6554747)
What? It already happened. That's exactly what happens when you do something that is not part of the asm.js subset in "use asm" code.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by aegiso on Tuesday October 15, 2013 @01:43PM (#6554926)
I don't use Firefox but if that's the case then asm.js can no longer claim to be "just javascript". I wasn't expecting that one.

Interestingly enough, this makes the V8 approach all the more welcome since it doesn't break backwards compatibility.

Re:“The 'use asm' pragma is not necessary to opt into optimi... by yohanatan on Tuesday October 15, 2013 @01:53PM (#6555010)
It sounds like you missed the distinction between a) displays an error and falls back to slower code and b) does not display an error and silently falls back to slower code. Neither of these options break any compatibility with Javascript proper (and yet one of them is highly more desirable than the other).
Re:“The 'use asm' pragma is not necessary to opt into optimi... by azakai on Tuesday October 15, 2013 @03:53PM (#6555887)
asm.js does not break backwards compatibility, asm.js code runs exactly the same in all browsers (if it doesn't, that's a bug and must be fixed of course).

Firefox will warn about asm.js validation errors, but those are just warnings in the web console. They do not affect semantics of execution at all, and are undetectable by the running code. So the code will run identically in all browsers regardless of whether it happens to fall in the asm.js subset or not.

Re:“The 'use asm' pragma is not necessary to opt into optimi... by moutarde on Tuesday October 15, 2013 @01:19PM (#6554706)
Just run the code through a linter that recognises "use asm" as part of the build/test process.
Re:“The 'use asm' pragma is not necessary to opt into optimi... by nnethercote on Tuesday October 15, 2013 @08:28PM (#6557290)
azakai answered this already, but it's nested deeply below: Firefox gives a console warning if asm.js compilation fails. In fact, it also gives a console warning if asm.js compilation succeeds! So there's never any doubt, and JS semantics are maintained.