4 ms·
Serious question: Isn't React Native just a short-term fix while we wait for WASM?
by intrasight 10y ago
Serious question: Isn't React Native just a short-term fix while we wait for WASM?
- johncolanduoni 10y agoIf you mean you'll write something in a language with a C-ish ontology (C, C++, Swift, Rust, etc.), WASM won't help you much because you can already compile these languages for both platforms and interact via bindings; WASM won't buy you anything except for mandatory interpreter overhead on iOS. If you mean a GC-ed language like JS or Java, WASM doesn't yet have native GC and likely wouldn't be much better than JavaScript as a compiler target for these languages even if/when it does. WASM solves a totally orthogonal problem: running native-ish code in places where native code is currently unacceptable (e.g. web, other low-trust scenarios). Major mobile platforms can handle native code just fine, and WASM does precisely zero to help you write bindings for platform APIs.
- intrasight 10y ago>WASM solves a totally orthogonal problem I disagree. I want to dump "native" and just have a more performance engine than is JavaScript. I am assuming that more native hardware will be exposed via WASM. I want the high-level language that is compiling to WASM to isolate me from the platform differences. Perhaps is wishful thinking on my part.
- johncolanduoni 10y agoWhat do you mean by native hardware? WASM's only goal is to expose some "hardware" in the CPU itself, all of whitch is already available to (and mostly used by) the existing JavaScript engines. Anything that goes through a driver has nothing to do with WASM; its specification explicitly does not define any APIs that WASM code can access at all. If you want more performant code than you're getting from hand-written JavaScript, you need either (a) an improved JavaScript engine or (b) to write code in a different language. WASM isn't some magic escape hatch for high level languages.
- deleted 10y ago[deleted]
- scarlac 10y agoNot quite. WASM will enable faster web-based performance, but you're still building on top of a browser. If you're using the DOM, then you're still subject to the normal performance bottlenecks there, and if you're using canvas then you need to re-implement a lot of UI code. React Native is layer on top of actual native components on the respective platforms. They two are wildly different technologies. I enjoy RN and I do look forward to WASM as well, but I don't see them overlapping anytime soon.
- intrasight 10y ago>Still building on top of a browser Yes, that's what I want >normal performance bottlenecks there, I've never found the DOM to be a performance bottleneck, and I build UIs with thousands of elements. >I don't see them overlapping anytime soon I hope not. Like I said, I don't want React - I want WASM and good high level languages. And I want more device support with WASM.