by tux1968 · 8y ago · 0 comments
We're all focused on the potential performance rather than what this will actually be used to deliver -- so maybe i'm just missing what prevents this technology from subverting the open web.
Back in the day we had Flash-only web sites. They died off because it turns out that it's easier to just throw HTML, CSS, and JS at people, and since these were open standards, there was a fair bit of competition between different vendors to make better tools for consumption, authoring, and delivery.
If you want to reimplement that experience in WebAssembly, the ROI is going to be horrible and if you render everything to a canvas your site won't be indexable by Google (goodbye traffic) or workable with screen readers (hello lawsuits).
Apple/Google/Microsoft would be stupid if they weren’t already working on a Swift/Kotlin/C# to WebAssembly compiler, as each of them would give them for their preferred language what JavaScript now has: the ability for developers to work in a single language, and move code between browser and backend at will.
Long-term, JavaScript is dead.
In practice, it does not.
It's too low level, and the APIs to access browser features are not available, so you have to go through seriously ugly APIs and just do it in JS anyhow.
So if you have to go to JS to do pretty much everything, why are we using WASM again?
Performance? Is performance the issue? Because if it is, isn't there maybe better ways of solving that problem?
It's certainly not for portability, we already have that.
To make 'web development available to C coders' ... Not sure that's it since they will invariably have to know web browsers anyhow ...
WASM is a great idea that won't gather steam until there are direct APIS. Which is on the roadmap I think.
I'd suggest just trying to build a simple WA, or even trying to make a simple app out of WA. Things look different then.
It's a nice dream to have, we're still a ways off.
However, I can think of two very compelling use cases for WASM.
As an addition to JS, it gives JS programmers access to a wealth of libraries and programs written in other languages. Codecs and compression algorithms, linear algebra libraries, image and audio processing, and a million other things have good libraries that just don't happen to be written in JavaScript. Adding a WASM blob as a library you can call from JS is a huge success. Suddenly you can do tons of client-side processing that was too prohibitive before (from an engineering cost standpoint).
As an alternative to Flash and Unity Player, you can write games for the web using WASM without having to deal with JavaScript.
Having used WASM personally, I can say with conviction that it is a compelling addition to the open web.
No, you have to go through a seriously crazy api wherein data is passed into a single managed array in wasm, and pulled off in JS and visa versa.
Ok - so accessing C libs is useful?
Are bindings from other languages to C considered to be really an important things for those languages?
Was there a specific set of libs that we were angling for?
Does it even make sense to do those things in the browser?
And what about the limitations - i.e. having to pass data into and out of the WASM container - does that play well with usage of 'codecs'?
Maybe not.
So why again does WASM exist?
What as the compelling use case?
Flash/UX is definitely not it.
I don't see any real uses cases for things like codes, nor was I seeing demand.
So where is the market/product need? And use case?
This is cool tech that's a long way off from being useful in the real world.
Having gone through the pain of writing my own little app, I realized that it's still fairly bleeding edge. I will go back to it when there are deeper APIs between JS and C, are the toolchain is more stable.
Besides that, are modern sites actually accessible in that regard?
And yes, modern sites really are accessible. Screen readers traverse the DOM looking for the semantic information that's already there. Look at WCAG (https://www.w3.org/TR/WCAG/), you'll see how easy it is to follow the guidelines. Unless, of course, you stick a bunch of stuff in a <canvas>...
The degration in detach indexing and user experience, load time and battery usage would quickly make a first mover loose users.