5 ms·
How would you say Purescript compares to something like Elm?
by wry_discontent 10y ago
How would you say Purescript compares to something like Elm?
- nilkn 10y agoAs a very superficial comparison, PureScript is a lot more similar to Haskell than to Elm. All three are great languages, but of the three Elm is definitely the simplest and IMHO most beginner-friendly. It's also the least flexible and general. In many ways, PureScript is actually a better version of Haskell (e.g., with extensible records). But it's currently very focused on front-end development, and it's missing amazing Haskell features like STM. So outside of front-end stuff it's not nearly as practical to use as Haskell.
- dmix 10y agoThe Elm wikipedia page has a good example of it's limitations compared to PureScript/Haskell: > Unlike Haskell, Elm has no support for higher-kinded types, and thus cannot provide generic abstractions for many common operations.[20] For example, there is no generic map, apply, fold, or filter function. Instead, such names are used prefixed by their module, such as List.map and Dict.map. [1] And from the above source link: > You can't define higher-kinded things like Functor/Applicative/Monad/Foldable and do dictionary-passing style for ad-hoc polymorphism in Elm. [2] But personally, I haven't tried Elm yet so I can't comment. I'm not sure I want to invest in learning a whole new language/framework just to do front-end work. By learning PureScript I can transfer the same knowledge/experience coding in that language to the backend when using Haskell. Much like Clojurescript and a lesser extent Node.js. While Elm is limited to front-end use. [1] https://en.wikipedia.org/wiki/Elm_(programming_language)#Limitations https://en.wikipedia.org/wiki/Elm_(programming_language)#Lim... [2] https://github.com/elm-lang/elm-compiler/issues/396 https://github.com/elm-lang/elm-compiler/issues/396
- hellofunk 10y ago> By learning PureScript I transfer the same skillset to the backend do you mean "frontend" ?
- dmix 10y agoNo I mean the better I get at PureScript programming the better I will be at Haskell. As the syntax is very similar and the programming paradigm (purity, algebraic data types, etc). Elm is a niche platform without applications outside of front-end (AFAIK).