5 ms·
> Everyone thought WASM would enable developers to write code in any language they wanted (with type checking and higher performance) and deploy it on the web.
by dfabulich 5y ago
> Everyone thought WASM would enable developers to write code in any language they wanted (with type checking and higher performance) and deploy it on the web.
https://developer.mozilla.org/en-US/docs/WebAssembly/Concepts https://developer.mozilla.org/en-US/docs/WebAssembly/Concept...
> WebAssembly is a different language from JavaScript, but it is not intended as a replacement. Instead, it is designed to complement and work alongside JavaScript, allowing web developers to take advantage of both languages' strong points
"Not intended as a replacement"
WASM is a math coprocessor for JS. WASM can't even talk to the DOM API directly (which is the API you use to build web pages in JS); you have to write JavaScript glue code for any/all I/O in WASM.
- slver 5y ago> WASM can't even talk to the DOM API directly For now. It's planned.
- mr_toad 5y agoFor existing code bases that don’t already do DOM manipulation (so, all of them) other parts of the Web API might be more useful, like the canvas, the video API, the RTC API etc.
- slver 5y agoThe issue in general is how to bridge these JS OOP APIs to something that's basically assembler. If WASM gains a foreign object model calling convention or whatever, we're in game.
- emteycz 5y agoWasm is not basically assembler, it's (going to be) very high level: - https://github.com/WebAssembly/reference-types https://github.com/WebAssembly/reference-types - https://github.com/webassembly/threads https://github.com/webassembly/threads - https://github.com/WebAssembly/exception-handling https://github.com/WebAssembly/exception-handling - https://github.com/WebAssembly/function-references https://github.com/WebAssembly/function-references - https://github.com/WebAssembly/gc https://github.com/WebAssembly/gc Though it is true that the original MVP was very barebone and could be compared to assembler. However, the reference types proposal has been shipped in all major browsers and is considered "finished".
- pjmlp 5y agoThat was the idea, the world decided otherwise based on the Flash and Silverlight experience versus clunky Web. https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor https://platform.uno/ https://platform.uno/ https://leaningtech.com/ https://leaningtech.com/ https://flutter.dev/ https://flutter.dev/ https://wiki.qt.io/Qt_for_WebAssembly https://wiki.qt.io/Qt_for_WebAssembly