news.volyx.in

Making WebAssembly a first-class language on the Web (hacks.mozilla.org)

664 points by mikece · 128 days ago · 271 comments on HN

Article summary

The article discusses the limitations of WebAssembly (WASM) on the web, specifically its status as a second-class language due to its lack of tight integration with the web platform. This leads to a poor developer experience, making it difficult for average developers to use WASM. The article proposes the WebAssembly Component Model as a potential solution to improve the situation. The model aims to provide a standardized way for languages to generate artifacts that can be run by browsers without the need for JavaScript glue code.

Main themes

  • WebAssembly limitations
  • Web platform integration
  • Developer experience
  • JavaScript dominance
  • WebAssembly Component Model
  • Language portability

What commenters say

  • WebAssembly is not widely used on the web because it is not well-suited for running untrusted apps in a browser, unlike JavaScript which is dynamically typed and object-oriented.
  • The impedance mismatch between WebAssembly's linear memory model and the browser's object-based programming model is a significant obstacle to its adoption.
  • The WebAssembly Component Model is a potential solution to improve the developer experience and make WebAssembly a first-class language on the web.
  • Removing JavaScript glue code is not a significant advantage for WebAssembly, as it does not enable new use cases and may not provide substantial performance improvements.
  • WebAssembly has the potential to make web apps first-class citizens, allowing them to compete with native apps in terms of efficiency and security.
  • The WebAssembly Component Model may not be the best solution to accelerate DOM access, and simpler solutions may be available.
  • WebAssembly does not necessarily solve the platform lockdown problem, as it can still be restricted by the runtime environment in which it is executed.
  • The popularity of TypeScript suggests that dynamic typing is not a universal ideal, and WebAssembly's static typing may be a better fit for certain use cases.