Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Webassembly can fulfill that requirement for certain use cases


I don't think that was the original intent of WASM nor what its VM is designed for, even if people are now attempting to make it work in this fashion.

It was designed for "native-like" execution in the browser (or now other runtimes.) It's more like a VM for something like Forth than something like Python.

It's a VM that runs at a much lower level than the ones you'd find inside the interpreter in e.g. Python:

No runtime data model beyond primitive types - nothing beyond simple scalar types; no strings, no collections, no maps. No garbage collection, and in fact just a simple "machine-like" linear memory model

And in fact this is the point of WASM. You can run compiled C programs in the browser or, increasingly, in other places.

Now, are people building stuff like this overtop of WASM? Yes. Are there moves afoot to add GC, etc.? Yes. Personally I'm still getting my feet wet with WebAssembly, so I'm not clear on where these things are at, but I worry that trying to make something like that generic enough to be useful for more than just 1 or 2 target languages could get tricky.

Anyways it feels like we've been here before. It's called the JVM or the .NET CLR.

I like WASM because it's fundamentally more flexible than the above, and there's good momentum behind it. But I'm wary about positioning it as a "generic high level language VM." You can build a high-level language VM on top of it but right now it's more of a target for portable C/C++/Rust programs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: