News for hackers. Stuff that matters.
Re:Why WebAssembly is innovative even outside the browser by oblak on Sunday August 08, 2021 @04:25PM (#28109794)
serious question: what would wide WASM adoption mean for js developers? is my obsolescence imminent?
Re:Why WebAssembly is innovative even outside the browser by azakai on Sunday August 08, 2021 @05:11PM (#28110149)
While WebAssembly is better for some things than JS, for most code you run in a browser, it's no improvement and actually worse.

When you do need wasm, though, then it opens up entire new possibilities, things you really couldn't do before. I like to compare wasm to the video element: not every site should use it, and it won't replace JS or CSS or HTML, but its existence makes things like YouTube and Netflix possible.

The future of code on the web is JS + wasm.

Re:Why WebAssembly is innovative even outside the browser by pjmlp on Monday August 09, 2021 @08:17AM (#28115819)
The future is WebGL/canvas + WASM, Flash's revenge.
Re:Why WebAssembly is innovative even outside the browser by brundolf on Sunday August 08, 2021 @05:40PM (#28110362)
Never pin your career to just one language/framework/technology; otherwise you'll become obsolete at some point no matter which one it is.

That said: I don't think you need to worry about JS receding for at least another decade, maybe two.

Re:Why WebAssembly is innovative even outside the browser by AkshitGarg on Sunday August 08, 2021 @04:29PM (#28109821)
WebAssembly in the browser currently can't manipulate the DOM directly. Neither can it make HTTP requests. You need to use a JS bridge to do that. That has some overhead. So I don't think webassembly will replace JavaScript anytime soon. It might be reserved for high-performance compute, or maybe canvas based rendering for the time being.
Re:Why WebAssembly is innovative even outside the browser by Unit520 on Sunday August 08, 2021 @09:50PM (#28111930)
Upcoming versions of Google Docs will use canvas based rendering [0], and I presume their custom renderer might be compiled to WebAssembly. WASM and Canvas (potentially using WebGL) are definitely an interesting combination right now.

[0] https://news.ycombinator.com/item?id=27129858

Re:Why WebAssembly is innovative even outside the browser by runawaybottle on Sunday August 08, 2021 @05:00PM (#28110061)
I think the nail in the coffin will only happen when the DOM is killed. If someone can write a rendering engine in WASM that renders to canvas (maybe even render apps with webgl), then can just create a new api for browser apps.

That’ll be the end of frontend as we know it, and everyone will have to learn this new api. The benefits are obvious, we’ll finally have a rendering engine for apps. I suppose document-based html pages can stick around, but the rest of us can move on.

Re:Why WebAssembly is innovative even outside the browser by still_grokking on Sunday August 08, 2021 @07:23PM (#28111125)
You mean like for example MS Blazor WASM, or Qt for WebAssembly (QML in the browser)?

Even I think something like that is long overdue (as the misuse of HTML and DOM as the most horrible GUI framework for application development ever invented should stop immediately) I somehow don't like the outlook of MS Blazor becoming a thing. I hope everybody knows what that would mean: "Windows" (APIs) in the browser…

QML on the other hands side looks good (at least from the outside). But it's nowhere close to significant usage, so no hope for that, frankly.

Re:Why WebAssembly is innovative even outside the browser by rini17 on Sunday August 08, 2021 @06:39PM (#28110837)
And it will be exactly as infuriating as Flash was (except for the artist). Change my mind.
Re:Why WebAssembly is innovative even outside the browser by pjmlp on Monday August 09, 2021 @01:34AM (#28113040)
I won't surely change your mind, that is exactly what I am looking for.

WebAssembly made us regress 10 years, and we lost the great GUI based tooling for Web page creation and 3D games that are actually hardware accelerated without browsers doing blacklists.

https://platform.uno/

Re:Why WebAssembly is innovative even outside the browser by idsout on Sunday August 08, 2021 @11:23PM (#28112446)