6 ms·
Why not Haskell? If you're going to be transpiling to JS might as well get all the power of purity and robust typing.
by dreamdu5t 11y ago
Why not Haskell? If you're going to be transpiling to JS might as well get all the power of purity and robust typing.
- jonahx 11y agoWhich haskell to js project do you recommend? The wiki lists a number of them, but it's to tell which is the best choice.
- dreamdu5t 11y agoGHCJS. That said, there's not necessarily a best choice because it depends on what type of application you're transpiling. There's an Om-like UI project with bindings to virtual-dom https://github.com/boothead/oHm https://github.com/boothead/oHm as well as various react bindings such as https://github.com/joelburget/react-haskell https://github.com/joelburget/react-haskell
- 15155 11y agoghcjs. For something that follows the semantics of JS and produces very readable code (a la TypeScript), PureScript is really nice.
- mrspeaker 11y agoI kind of agree with this - if you want to do JavaScript, do JavaScript... if you're going to bother transpiling to non-standard JavaScript - go all the way and get the power of Haskell!
- z1mm32m4n 11y agoThey did mention in the article that PureScript was one of the languages they considered rewriting their stack in. PureScript is very heavily influenced by Haskell (they're almost the same languages), but among other things PureScript is strictly evaluated. It seems from the article like the reason why the dismissed it was that it interoperated poorly with existing vanilla JavaScript libraries.