6 ms·
PureScript already has the Haskell -> Javascript niche covered: https://en.wikipedia.org/wiki/PureScript https://en.wikipedia.org/wiki/PureScript
by cyorir 7y ago
PureScript already has the Haskell -> Javascript niche covered:
https://en.wikipedia.org/wiki/PureScript https://en.wikipedia.org/wiki/PureScript
- ghostwriter 7y agoWhy using a separate language if GHCJS is already good enough?
- cyorir 7y agoAccording to the creator of PureScript: "Solutions at the time included various attempts to compile Haskell to JavaScript while preserving its semantics (Fay, Haste, GHCJS), but I was interested to see how successful I could be by approaching the problem from the other side - attempting to keep the semantics of JavaScript, while enjoying the syntax and type system of a language like Haskell." https://leanpub.com/purescript/read#leanpub-auto-about-the-author https://leanpub.com/purescript/read#leanpub-auto-about-the-a...
- ghostwriter 7y agoIt's a good reason for the author of the language, and for anyone who's interested in designing programming languages. However, I often wonder why people in the industry promote it as a great choice for developers who are looking for a "Haskell for frontend", instead of recommending GHCJS. I do understand why Elm is recommended instead of Haskell for simplicity reasons, but PureScript is neither simpler nor (presumably, if I'm not missing something) conceptually more valuable (i.e. bringing refreshingly new ideas) than GHC Haskell.
- wwright 7y agoPurescript does have algebraic effects and row polymorphism generally, which Haskell does not AFAIK (I don’t do as much Haskell as I would like so I may be wrong.)
- ghostwriter 7y agoAlgebraic effects are not part of the language implementation, but there are libraries like fused-effects[1] that implement them. Row polymorphism has been proposed a few years ago [2], but as with any community effort, the timeline and possibility of the actual implementation depends on the amount of attention put into it instead of some other (probably important, too) work. [1]: https://github.com/fused-effects/fused-effects https://github.com/fused-effects/fused-effects [2]: https://github.com/ghc-proposals/ghc-proposals/pull/180 https://github.com/ghc-proposals/ghc-proposals/pull/180
- ferzul 7y agoghcjs is kinda slow on my phone.