3 ms·
> If that were true, nobody would be working on WASM because there would be no point. Wasm has much more potential than just optimization. It opens up capabili
by staticassertion 5y ago
> If that were true, nobody would be working on WASM because there would be no point.
Wasm has much more potential than just optimization. It opens up capabilities like:
* Using other languages besides Javascript, or languages that just compile to JS
* Passing programs around vs passing data around
* Providing a VM isolate abstraction that's embedable in your existing language/ runtime
- UnpossibleJim 5y ago|* Using other languages besides Javascript, or languages that just compile to JS| This might be the most under appreciated comment I have seen all day. While Typescript did some wrangling to bring a bit a bit of "normalcy" to Javascript, the consistency that C++/Rust bring from a coding language point is (for me) enough to have gottem me interested in the use of WASM. Maybe I'm just lazy or have a strong dislike of the headache I get from learning JS compared to switching over to other languages.
- jerf 5y agoIf WASM wasn't faster than Javascript, nobody would care. They would just compile things to the "as fast as C" Javascript, and it would have been done years ago. We need to redo all this work for WASM precisely because there is no such thing in general as "as fast as C Javascript". Javascript itself is not a suitable target for all those things. A 10x performance haircut off the top, in addition to what it costs to get to even performance that good (JITs tend to eat RAM like candy to get their performance increases on dynamic languages), just wasn't an acceptable base for the things you're talking about.
- staticassertion 5y agoI'm using wasm and I'm not even targeting the web. JS is irrelevant to me.