Hacker News new | ask | show | jobs
by dmjio 2438 days ago
This post dismisses Elm on the basis of lack of typeclasses, but fails to mention miso (https://haskell-miso.org), that includes typeclasses. Miso is Elm-as-an-embedded-DSL written as a Haskell library for GHCJS that allows one to share types on the front and backend, take advantage of the entire Haskell ecosystem and has experienced commercial use.
3 comments

I agree that Miso deserves a mention. It seems to be very actively maintained.

On the other hand, if you reject GHCJS then Miso is out of the running immediately. And the reason to reject GHCJS (big bundles, as mention in the article) is something you dont have in Elm/PureScript/ReasonML.

https://github.com/dmjio/miso

There is a company that has a 400 module miso application and the bundle size is not an issue (https://www.polimorphic.com). After closure compilation GZIP'ing, pre-rendering and caching of the JS, it's a one-time cost, and is negligible due to pre-rendering. We build websites for users, who care only about experience, not about how large the payload is. Payload only matters insomuch as it adversely affects user experience. This argument is strictly a developer concern and is in no way correlated with end-user feedback. There are many <1MB js payload size websites with 0 users.
After our bad experience in 2016 using GHCJS on a big project, we haven't considered it for anything since. Anything that arrived after that related to GHCJS just hasn't been on my radar ("a history of my own experience in this problem space").
Would you be able to share more details as to what caused this bad experience? My experience with GHCJS on a big project has been the opposite.
Note that Elm has typeclasses, they are just not exposed in the language: https://medium.com/@terezk_a/haskell-in-elm-terms-type-class...