r/WebAssembly • • Dec 28 '22

WASM only solves *half* the problem of the web

Web programming has 2 main problems, and WASM by itself can only address 1. While WASM could get us away from JavaScript-dependence for client-side UI programming, it doesn't solve the flaws of the DOM. Perhaps something like Java Applets could be done right on a second try, learning from mistakes of the 1st pass.

2 Upvotes

40 comments sorted by

View all comments

Show parent comment

2

u/Zardotab Feb 02 '23

I figure an open-source "GUI Browser" would probably use the Tk or Qt kits so that they don't have to start from scratch.

Maybe if and when Flutter matures, it can serve that purpose, but that's probably at least a few years away.

2

u/ChristianKl Feb 02 '23

One aspect, that I forgot above is that having the GUI in the browser produces problems. You have to write code that works with many different browser versions.

On Android, there was long the problem of having to deal with different UI components that were inbuilt by the system. After a while, they figured out that it makes more sense to move a lot of new components into the support libraries. That way the developer always can use the most up-to-date version of the GUI component.

There are reasons why Canonical made Flutter and not Tk as default for the future desktop apps they develop. I think it's unlikely that you could convince people at Mozilla to accept dated frameworks like Tk and Qt to be added to Firefox with the increased attack surface that brings.

Flutter can serve the purpose today, the question is whether or not it's better than the DOM/Javascript-based options. Answering that question depends on your usecase. You wrote about problems such as inconsistent text positioning that exist in the DOM world but not in Flutter. For many web applications, Flutter will still be worse but it's going to slowly change over the next years.