r/AskProgramming • • Jul 07 '21

Will WebAssembly ever achieve mainstream status?

I'm a web developer and I don't like web development. I think we're trying to do a lot more in the browser right now than what we were ever meant to do. I might be a bit old fashioned, but I miss downloading a piece of responsive, powerful desktop software instead of using either an Electron monstrosity or a sluggish web app.

Having said that, something that really excites me is WebAssembly. For something that became stable in what, 2015, 2016, it just hasn't made a lot of progress. Why is that? Why haven't we seen WebAssembly really hit the mainstream? I know there are companies out there working on various WASM techs, Microsoft included, but it just doesn't really seem to get talked about. Thoughts?

52 Upvotes

32 comments sorted by

View all comments

5

u/jddddddddddd Jul 07 '21

I've not played with it in a couple of years but..

  1. I don't think it has native DOM access ATM, so you still need some JS, and if you're using some JS, why not do it all in JS?

  2. I don't think it has Garbage Collection baked-in (yet) and therefore you're restricted to using languages where you handle your own allocation of memory (C/C++/etc.) I think GC is coming, but haven't bothered checking.

  3. Association with malware. A little while ago there was a report that X% of WASM found in the wild were bitcoin miners, etc.

  4. Lack of developers? There's millions of (cheap) JS devs out there.

Happy to be corrected on any of the above, as, like I said, I've not really looked at it in a few years.

Oh, and you might want to try r/WebAssembly as you'll get a better (and possibly biased?) response there.

8

u/xroalx Jul 07 '21

C# can be compiled to WASM, so either it brings its own GC, or there already is GC in WASM.

3

u/jddddddddddd Jul 07 '21

I think it brings it's own GC, but I seem to remember reading somewhere that having to reimplement GC at the WASM level was inefficient (when compared to having GC baked into, say, the JVM).

But like I said, I've not looked into this much, and even then it was a few years ago.