I’ve been wondering about this for a while and haven’t really found a great answer for it. From what I understand, WASM is:

  • Faster than JavaScript

  • Has a smaller file size

  • Can be compiled to from pretty much any programming language

  • Can be used outside of the browser easier thanks to WASI

So why aren’t most websites starting to try replacing (most) JS with WASM now that it’s supported by every major browser? The most compelling argument I heard is that WASM can’t manipulate the DOM and a lot of people don’t want to deal with gluing JS code to it, but aside from that, is there something I’m missing?

  • Reva@startrek.website
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    As a hobbyist web dev:

    • I want to support niche browsers that might not support WASM such as Dillo or NetSurf.
    • Most of the resources out there are Javascript-only.
    • I don’t even use scripting most of the time in order to be accessible to text-only, old and minimalist browsers.

    I can also imagine that people who are more professional than me in their development require existing JS frameworks, libraries, tutorials and whatever, and were taught in Javascript; there is no reason for them to change. There is also probably no real money in developing WASM applications commercially.