Hacker News new | ask | show | jobs
by dreamdu5t 3896 days 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.
2 comments

Which haskell to js project do you recommend? The wiki lists a number of them, but it's to tell which is the best choice.
GHCJS. 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 as well as various react bindings such as https://github.com/joelburget/react-haskell

ghcjs.

For something that follows the semantics of JS and produces very readable code (a la TypeScript), PureScript is really nice.

I 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!
They 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.