5 ms·
IMHO: No, I don't think WASM is the end of Javascript, in the best case both flavours can focus on what they do best (Javascript for light-weight web-frontend s
by flohofwoe 10y ago
IMHO: No, I don't think WASM is the end of Javascript, in the best case both flavours can focus on what they do best (Javascript for light-weight web-frontend scripting and DOM manipulation, WebAssembly for computation modules). And Javascript can focus on being a 'scripting language' again, and not a compile target. I think most serious WebAssembly apps will still use Javascript glue code for the actual HTML/CSS frontend.
I also think there will be many web apps which are 50/50 JS/WebAssembly where WebAssembly is used for libraries that need to do fairly heavy computations, but can do that without having to call into browsers APIs too much (e.g. image processing, physics engines, AI, etc...).
Android NDK is heavily used for games, I wouldn't say that 'nobody started using it'.
I'm not seeing the appeal for running languages on top of WebAssembly that need a heavy runtime environment. The big downloads this requires will kill all the fun. Even C++ will create bloated WASM modules if one isn't careful. Using 'embedded style' programming practices really makes sense when trying to reduce module size for asm.js/WebAssembly.
- pjmlp 10y ago> Android NDK is heavily used for games, I wouldn't say that 'nobody started using it'. Which is very much the only use case that Google's supports, and Android APIs that are exposed to it, for anything else welcome to JNI.
- flohofwoe 10y agoTrue, and isn't that a shame :/
- floatboth 10y agoIsn't JNI on Android also "NDK"? NDK provides a compiler toolchain and a build system — if you're building native libraries to JNI into, that's also built by NDK.
- flohofwoe 10y agoInternally: yes. But if all you need is the C-APIs provided by the NDK you don't need to deal with JNI (or Java). Unfortunately the NDK doesn't provide much.
- pjmlp 10y agoYes, but I imagine you never had the "pleasure" to use it.
- floatboth 10y agoDidn't have any problems either. I mean, writing JNI code by hand is hell, sure. Just… don't do it. javacpp automates all that crap. https://github.com/myfreeweb/freepass/blob/fad2a1fd592cbe6a9d8388a5fb7e8b4703ebeccd/android/app/src/main/kotlin/technology/unrelenting/freepass/Vault.kt#L9-L10 https://github.com/myfreeweb/freepass/blob/fad2a1fd592cbe6a9...
- pjmlp 10y agoThe point is calling Framework APIs from C++. Of course there are workarounds like Swig, Djini, JNICpp, but those are just that, workarounds for the lack of support from the Android team. iOS and UWP devs support C++ use via Objective-C++ and C++/CX (to be eventually replaced by C++/WinRT), even if C++ isn't the main platform language, instead of leaving the community alone to sort out the FFI issues. Since Android is anyway a fork of Java, they could either provide C++ Frameworks that wrap Android APIs or provide something like gcj CNI.
- greenhouse_gas 10y agoI was under the impression that mobile Qt and Xamarin were practically native apps with a thin Java display layer.
- invalidname 10y agoNope. Two remarkably different approaches. QT has its own widget system on top of low level rendering. Xamarin wraps native OS widget API's so it's not write once run anywhere but more of a porting solution. See this: https://www.linkedin.com/pulse/how-pick-right-cross-platform-solution-shai-almog https://www.linkedin.com/pulse/how-pick-right-cross-platform...