▲ | palmfacehn 3 days ago | |||||||
A batteries included standard lib included with the runtime is one approach. Yes, you would know upfront the version which the browser implements. From there you could dynamically load a polyfill or prompt the user to upgrade. Alternatively, because there are now (often ridiculous) build systems and compilation steps, we might expect similar behavior to other compiled binaries. Instead we get the worst of both worlds. Yes, JS as it is is some kind of standard, but at a certain point we might ask, "Why not throw out the bad designs and start from scratch?" If it takes ten years to sunset the garbage and offer a compatibility shim, that's fine. All the more reason to start now. A purely compiled WASM approach with first class DOM access or a clean scripting language with a versioned standard lib, either option would be better than the status quo. | ||||||||
▲ | crabmusket 3 days ago | parent [-] | |||||||
> A purely compiled WASM approach I would love to see if a browser could like... "disaggregate" itself into WASM modules. E.g. why couldn't new JS standards be implemented in WASM and hot loaded into the browser itself from a trusted distributor when necessary? Missing CSS Level 5 selectors? Browser goes and grabs the reference implementation from the W3C. Low-level implementations could replace these for the browsers with the most demanding performance goals, but "everyone else" could benefit from at least remaining spec compatible? (I guess this begs the question of "what's the API that these WASM modules all have to conform to" but I dunno, I find it an interesting thought.) | ||||||||
|