Hacker News new | ask | show | jobs
by torginus 6 days ago
> Were you involved in some way?

Only as a developer using the technology, as part of a failed commercial venture.

> If so, I'm curious to know why you think NaCL did not achieve broad adoption?

NaCl had 2 limitations compared to WASM, the first one was a design philosophy difference:

Unlike WASM, it was designed to maximize compatibility with native code, so it had no ability to coexist in the same process with JS/DOM like WASM does. You had to put the code in an iframe, and talk to it via postMessage. WASM promised to be a better design, but a decade on, we can see it's missing most of those promised features, or said features are half-baked, and it has turned into one of the biggest NIH quests in modern computer science.

The second issue was that it worked through Chrome's plugin API, which has since been deprecated. You could sit down and standardize an API that's not chrome specific. The biggest piece of API surface the browser has is WebGL, and they essentially exposed OpenGL ES to the browser, which is identical to what PPAPI did.

Some APIs were much better, like audio just gave you a buffer to write into, compared to WebAudio, which aims to implement the whole processing pipeline via stringing together JS objects, and everybody seems to hate it.

> And what's stopping the world from catching up to your line of thinking and adopting a NaCL successor?

Theoretically nothing, but you'd have to fork Chrome, do the changes yourself, develop a spec and tooling and THEN ask browser vendors to standardize on your changes. If there was some soul who would undertake this task (maybe feasible with AI for a non-huge team?), combined with a strong awareness campaign to get committees to consider adoption. So it's a tall order in reality.

1 comments

I also have to add, that I think that WASM is the wrong approach - basically I get what they were going for but they should've either merged the JS and WASM 'worlds' so that these 2 pieces of code can interact without any friction, and are handled by the same VM. This would've allowed things like gradually compiling a JS codebase to WASM.

Alternatively, the should've stuck with the NaCL approach of two separate, isolated worlds, with maximum compatibility and peformance for native code.