Re:Grain: A strongly-typed functional programming language f...
by otabdeveloper4 on Sunday April 25, 2021 @08:57AM
(#26932342)
Their pitch is actually "compiles to WebAssembly".
Re:Grain: A strongly-typed functional programming language f...
by rst on Sunday April 25, 2021 @10:28AM
(#26932958)
The pitch on their home page is "puts academic language features to work". But one of those academic languages, Haskell, has a GHC-based compiler to Webassembly (asterius), and it's not clear why someone would prefer Grain if "academic language features" are what they want.
There are a bunch of languages that compile to webassembly, including Rust, Golang, Python (via Pyodide), and Kotlin, so that by itself isn't a great competitive differentiator either.
Re:Grain: A strongly-typed functional programming language f...
by otabdeveloper4 on Monday April 26, 2021 @04:24AM
(#26940446)
> There are a bunch of languages that compile to webassembly, including Rust, Golang, Python (via Pyodide), and Kotlin, so that by itself isn't a great competitive differentiator either.
If you've ever tried actually doing something with webassemly, you know that none of these actually work that well and should be considered pre-alpha software. (And often abandoned or unsupported.)
Realistically at this point your only choice for webassembly is emscripten, but the code quality and documentation quality of that project is abysmal.
Grain makes sense from that point of view; something that compiles to webassembly and isn't a giant pile of unvetted legacy hacks doesn't exist right now.
The language seems to draw lots of inspiration from Rust. Not sure how polished their type system is, though.
The pitch is also a bit unclear to me about which users are being targeted. In my experience, small languages that don't focus on a single area have a hard time, and aside from "modern functional language features" (and modern functional languages are a dime a dozen these days), there doesn't seem to be lots of specific about the target space.
On the other hand, it is nice to see that there is LSP support provided for the language.