3 ms·
Clojure compiles to JVM bytecode; what's stopping browser-builders from creating a similar bytecode format (or even JVM) so developers can build in their langua
by pfraze 15y ago
Clojure compiles to JVM bytecode; what's stopping browser-builders from creating a similar bytecode format (or even JVM) so developers can build in their language of choice? Time/effort?
- bokchoi 15y agoI've wondered this as well. Volta compiled MSIL to JS which made it language independent. The project seems to have stopped however.
- bokchoi 15y agoIgnore that, I misread your comment.
- zephjc 15y agoI found this article [1] that makes the argument that JS doesn't need a bytecode format, and sorta-but-not-really comes to the conclusion that a compact AST format would be a better choice as an intermediate, and mentions JSZap [2] (which itself seems to be more about compression than being used as an IL). I think an AST format that v8 and other JS engines could read could be awesome. Ultimately, I'd like to have a Clojure that can compiled to this AST. On servers, the ast files could be cached a la Python .pyc files. [1] http://www.2ality.com/2012/01/bytecode-myth.html http://www.2ality.com/2012/01/bytecode-myth.html [2] http://www.slideserve.com/elina/jszap-compressing-javascript-code http://www.slideserve.com/elina/jszap-compressing-javascript...
- deleted 15y ago[deleted]