3 ms·
I'm currently moving from Elm to PureScript. Here's why (from "strong" to "weak"): - Currently Elm has a sad story addressing integration with "native" javascr
by agrafix 11y ago
I'm currently moving from Elm to PureScript. Here's why (from "strong" to "weak"):
- Currently Elm has a sad story addressing integration with "native" javascript libraries and Elm is too opinioated in some cases, e.g. you can only use either the built-in 'Elements' or virtual-dom Elements to render frontend. This makes it hard to build modular components (see https://groups.google.com/forum/#!topic/elm-discuss/65tiRM7SxaA https://groups.google.com/forum/#!topic/elm-discuss/65tiRM7S... for example)
- While the simple type system in Elm (e.g. no type classes, no monads, ...) makes beautiful error messages possible, it really limits the abstractions that I am used to coming from Haskell
- Elm/Elm-make does not generate modules that conform to a "standard" js module system - thus it will not integrate well with other js tools
- Elm syntax is lacking 'where' clauses, which results in constant reindentation of code
Don't get me wrong - I liked Elm a lot; but it just does not seem mature enough to use in production - but it looks like a great language to start learning FP.
- sriku 11y agoElm's extensible records are more powerful than even what Evan is willing to encourage. You can use them to implement type classes as well as first class modules, albeit with a bit of extra typing (ahem). They even permit you to have multiple "instances" for the same type if you require that.
- agrafix 11y agoThe problem is that it will not work for higher kinded types as that's not supported in Elm. You can not define a functor, a monad, ...