2 ms·
The ability to leverage more native capabilities than JS can. A more generalized, less platform specific format for executable code already seems to be a goal f
by johncolanduoni 10y ago
The ability to leverage more native capabilities than JS can. A more generalized, less platform specific format for executable code already seems to be a goal for iOS and Android. Android of course has always used Java (well, Dalvik technically) bytecode, and Apple recently has started pushing their LLVM-based bitcode to reduce dependence on specific architectures.
If WebAssembly does a good job of exposing features needed for high-performance code, it could become feasible to move everything to WebAssembly and ditch support for native code on both platforms.
- patrick8 10y agoWebAssembly doesn't make native integration any easier than JS. Neither defines the exact way so called non-web embeddings actually are defined and both can support it. I honestly have no idea the relevance of WebAssembly in this discussion. Could you provide an illustrative example? Edit: I should clarify that for certain types of apps WebAssembly might be relevant but the discussion seemed to be out UI layer and I don't understand how WebAssembly fills a gap that a native API in JS could also provide along with the same challenges.
- johncolanduoni 10y agoI'm sorry, I'm using "native" in an unclear way (that should have been obvious to me). I don't mean it will help with native API integration (JavaScript can do that just fine), I mean as a replacement for machine code on both platforms. iOS of course uses machine code for everything, but on Android it's mostly whittled down to the minimum: things that Java can't do efficiently, or code that isn't Java. That's the role I hope WebAssembly can fill, but it still remains to be seen how usable their solutions for threads, SIMD, etc. are. A good example is games. Some do manage to use Java, but it's mostly a hindrance; being able to compile languages with a C style ontology to a platform-independent and efficient VM would be very helpful here.