4 ms·
This is a bit of a tangent but sometimes I wish browsers would just open up some kind of standardized assembly language like interface to the vm and the dom. Th
by crimsonalucard 12y ago
This is a bit of a tangent but sometimes I wish browsers would just open up some kind of standardized assembly language like interface to the vm and the dom. This would effectively make development for the browser virtually identical to the desktop; and also as a side effect, completely end this debate about "strengthening javascript."
- stupidcar 12y agoThey already do. The standardised assembly language is called "javascript".
- eatonphil 12y agoSee http://asmjs.org/ http://asmjs.org/
- crimsonalucard 12y agoStandardized? yes, assembly-like? No. Essentially I am saying expose a layer even closer to the metal in the browser so that these optimization problems can be moved to front end development.
- BrendanEich 12y agoSee past HN threads and posts that spawned them, e.g., this one: https://news.ycombinator.com/item?id=5707088 https://news.ycombinator.com/item?id=5707088 Apart from syntax wins, you can't get much lower-level semantically and keep both safety and linear-time verifiability. Java bytecode with unrestricted goto and type confusion at join points makes for O(n^4) verification complexity. asm.js type checking is linear. New and more concise syntax may come, but it's not a priority (gzip helps a lot), and doing it early makes two problem-kids to feed (JS as source language; new syntax for asm.js), which not only costs more but can make for divergence and can overconstrain either child. (This bit Java, pretty badly.) /be