|
|
|
|
|
by AlOwain
76 days ago
|
|
I realize this is not an orthodox view, but WASM won't make the typical user have a better experience. I think it could improve Photopea, the various office suite programs, and perhaps unknown unknowns. But, much more important than the uncertain is the current Web which will become less accessible and closed. The ease in reverse engineering JavaScript has more than once shown negligence and malice by Website developers (one example is the recent Google scandal, where they were diminishing the user experience on competing browsers). If I wanted to run trusted programs, I would have used native binaries. |
|
The first thing to highlight is that multithreading is possible but extremely impractical on the web, and even if you succeed, it's slow. Check out Surma's video on it: https://www.youtube.com/watch?v=7Rrv9qFMWNM
Using threads unlocks so much performance, from everything to time-to-first-paint, time-to-interactive all the way to the general feel of the application.
That sort of optimization is trivial in languages designed for it (like Rust or Go).
Developer experience on the web is unbelievably poor. TypeScript is, semantically, fantastic, but then you have to build it - do you use swc or tsc, do you use webpack, rollup, rspack, vercel's stack, etc? Once you build it, what are your transpilation targets - did you even configure them or are you building bundles that are 40% larger for no reason? The runtime overhead of bundles is also non trivial.
Languages like Rust are maybe 20% more complicated than TypeScript - but they have TSX (also Vue templates, Angular templates, whatever) baked into the _core_ language - requiring no external transpilers or LSPs.
That doesn't mean every application is a good candidate for native/wasm - but the applications that would benefit would benefit end users and developers immensely.
The push back really makes no sense to me. Everyone complains about Electron (and OP about Linkedin, and everyone about Jira) being slow or eating up half their ram - yet with the same breath say that wasm would have no benefit.
> The ease in reverse engineering JavaScript
It's not as easy to reverse engineer native binaries - but you can do it pretty easily and produce the equivalent of minified source code from it. This is how emulators and custom firmware is created. It wouldn't prevent security researchers from identifying negligence.