|
|
|
|
|
by bayesian_horse
1866 days ago
|
|
Consider when you want to use WASM in the first place, when it's not just to pull in legacy code (like from C). You'd want to use it for performance-sensitive portions of code. Then it does make sense to have a well thought out language that doesn't have the baggage from other platforms but integrates well with WASM. Similar to "AssemblyScript", but with less baggage from Javascript. The other advantage of WASM is that it makes Javascript and its runtime get out of the way, enabling Grain to develop its own runtime and standard library. Then you could write a web application (or increasingly other things, too) in Grain, leveraging the language features. The appeal there would be less about performance and more about a more pleasant experience than you'd get with Javascript or Typescript. That's what I understood. I haven't even tried Grain yet. |
|
The question in my mind is do we need a language specialized for this? For example, a lot of the design choices of the language, like OCAML inspiration, good FFI are already part of other languages.
While to me that means it will probably be a niche language, the fact that it’s specifically targeting only WASM for now, will probably mean it will be a great language for experimentation that other languages can learn from.