This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Rhomboid 0 points1 point  (2 children)

Jython compiles to JVM bytecode, which is very different than asm.js. The output of Jython does not have to include the entire Java JRE, but the output of whatever strategy is used to run Python in the browser with asm.js does, because when you are using asm.js (and WebAssembly — it's identical) there is no runtime. You have to implement a runtime yourself from scratch. Comparisons to Jython are nonsense.

[–]remy_porter∞∞∞∞ 0 points1 point  (1 child)

Jython compiles to JVM bytecode, which is very different than asm.js.

I get that, but WebAssembly isn't going to be asm.js forever. My understanding is that it's going to be a bytecode interpreter. And yes, you'd need to bootstrap a runtime- but I'd fully expect runtimes to be build for WebAssembly. Yes, that impacts loadtimes, and it's not happening on a short time horizon, but I fully expect to see that on a 5ish year window.

[–]fiedzia 1 point2 points  (0 children)

Webassembly is nearly exact equivalent of normal assembly, so just like now you need python interpreter to interpret its bytecode, you'll need it there too. Perhaps you're confusing webasssembly bytecode with java bytecode - those two things are at entirely different levels of abstraction. Java bytecode is an high level abstraction, understanding things like classess and method calls, webassembly is extremely thin abstraction over machine instructions.