Hacker News new | ask | show | jobs
by asiachick 1866 days ago
I'm just going to guess that a language that is WebAssembly only, *if popular*, would eventually have 1000s of libraries that "just work" vs something like Rust where 99% of the code was never designed to run in a WebAssemebly environment and so probably references things that aren't available in that environment (files, networking, windowing systems, stdin/stdout, etc...)

I didn't look at Grain. I'm just thinking out loud what the benefits of a WebAssembly first language could be. It's not so much the language itself though.

1 comments

I don't expect Grain to evolve a huge ecosystem of libraries. A good standard library is certainly possible. The rest can be pulled in via Webassembly and Javascript when necessary.

It will probably make sense to use Grain along with React or Vue.js, for example, just because anything else will just not be worth the trouble.

I’ve been working with Rust and WASM for a little while now. I’ll say that at this point the tools in this area are already very good.

Most libraries that implement algorithms and data structures just work. It starts getting messy when things need access to the file system (or other environmental things) but that’s fairly obvious, and what would that be used for in a web context?

WASM already has WASI which is pretty well supported in Rust today, and works well for any POSIX like needs.

In terms of using with React or Vue, I expect no matter the language, the incorporation of WASM modules will be identical (the tooling is where things will set themselves apart).