That being said, I would very much welcome a high-performance alternative to Javascript that also runs in any browser -- something in the spirit of C or Java, which could be embedded in Javascript and vice versa.
That being said, I would very much welcome a high-performance alternative to Javascript that also runs in any browser -- something in the spirit of C or Java, which could be embedded in Javascript and vice versa.
Possible steps in that direction:
- Google Native Client: run native code in a sandbox [1]
- asm.js: A strict subset of JavaScript that can be optimized to native or near-native speed [2]
I much prefer the asm.js approach. I agree that there's a need for NaCl, but if we look at the browser as a sandboxed virtual machine that everyone has, we should all agree on a bytecode specification for that virtual machine. We pick JavaScript "because it is there". Once all browsers speak native asm.js, then you can compile your client-side code in whatever language you want, even C/C++ (see Emscripten for example). [3][4]
[1] https://developers.google.com/native-client/
[2] https://blog.mozilla.org/mbest/2013/06/25/asm-js-its-really-...
[3] https://github.com/kripken/emscripten
[4] http://games.slashdot.org/story/13/03/28/2113234/emscripten-...
re:HTML - What's the difference between a dynamic document and a dynamic application, really? With JS and CSS3, HTML is unrecognizable - pair it with something like Backbone.Marionette, and the only thing HTML is doing is defining your display in a structured way, more like the XML definitions of an Android view than an old-school document.