5 ms·
I think an interesting advantage of Grain is that it not only compiles to wasm but is wasm-first. Bringing existing languages to wasm is incredibly important,
by azakai 5y ago
I think an interesting advantage of Grain is that it not only compiles to wasm but is wasm-first.
Bringing existing languages to wasm is incredibly important, and probably that is 99% of wasm today. But a new wasm-first language that is designed specifically for wasm can do some things better.
For example, it is much easier to get tiny wasm files from a wasm-first language if it was designed for that.
Another example is wasm GC. The current proposal is making good progress but the type system will never be "perfect" for all languages (there will be extra casts, for example). A wasm-first language could (once wasm GC stabilizes) tailor itself to that for optimal results.
- Zababa 5y agoI honestly don't know enough about WASM to know how important being WASM-first is. That could be a nice thing to add to the website. About the GC, that's true, but that also means that they may have to rethink significant parts of the language once the GC proposal is accepted. Considering they talk about academic features, I could imagine something like linear types.