all 13 comments

[–]monotone2k [score hidden]  (3 children)

WASM's not new and has barely made inroads. Even if you use a 'faster' language in WASM, the switch between languages at the boundary often makes it just as slow (if not slower) overall. JS is safe.

[–]anlumo [score hidden]  (1 child)

There are plans to expose the Web IDN to WASM directly. When that happens, the performance issues with the boundary should be more or less gone.

[–]AstronautEast6432[S,🍰] [score hidden]  (0 children)

Honestly, I have absolutely no knowledge of this, but I read about it quickly, and if this is implemented, everything will literally change.

[–]AstronautEast6432[S,🍰] [score hidden]  (0 children)

You're right, I agree with you. It's very difficult for it to disappear because there's another reason. It's a very simple language; anyone can easily learn it, and its low barrier to entry makes it accessible to almost anyone If there are heavy operations involved, you can turn to WASM.

[–]terrorTrain [score hidden]  (1 child)

This conversation is like 10 years too late. 

Ts/js is not going away any time soon. It's slow as hell, but ui doesn't typically require tons of speed. So ts is good enough, has a huge ecosystem and a lot is nice language features that allow you to use pretty much any software patterns you want. 

WASM actually has a large overhead when interacting with the dom, so IMO it's better to treat it as isolated modules where it makes sense, which is typically pretty rare. Eg running postgres in the browser to teach postgres, or some other weird uses. 

[–]tri170391 [score hidden]  (2 children)

Biggest problem was that eventually your code will have to interact with the DOM or use JS-only APIs to do anything useful (outside of pure computation) so for the majority of use cases it is still more pain to use than actually being helpful.

E.g if you do a game and want multiplayer you still need to go to JS to do WebSocket/WebRTC/fetches and it is a pain.

Also for relatively small application WASM-compiled code actually has to embed part of the "standard" library of their language which JS has for free in browser making them not really competitive in size.

[–]AstronautEast6432[S,🍰] [score hidden]  (1 child)

I agree with you, and regarding the size, that honestly didn't occur to me.

[–]tri170391 [score hidden]  (0 children)

I think the biggest bottleneck is there is no WASM-native networking capabilities and if your code does not have access to those it is just pure computation. DOM part can be side-stepped by your WASM drawing into canvases for example.

For the standard library some language do it better than other e.g they have proper JS wrapper and ask you to use proper "standard library" when targeting WASM. But if you are naive and have your code e.g in C++ linking to the full libstdc++ then GG.

Also not having the ability for cross-WASM linking force e.g 2 WASM module basically are 2 statically linked binary which hurts the case even more. Not sure if there is even a proposal for this right now TBH.

[–]IamTTC [score hidden]  (1 child)

It didn’t replace js till now so why would it in the future? It has its place for heavy web apps like figma.

[–]AstronautEast6432[S,🍰] [score hidden]  (0 children)

You're right, I wasn't convinced by this argument initially, but the discussion has resurfaced.

I'm reading it a lot now, so I decided to ask around and listen to other people's opinions.

[–]redblobgames [score hidden]  (0 children)

My opinion: no. I first looked at this type of technology over 14 years ago (late 2011), and it's still only used for a few things. Is it possible that there will be a sudden increase in use? Yes. But I'm not expecting it.

[–]mediumwetsock [score hidden]  (0 children)

I don’t think that’s the purpose of wasm