Re:Show HN: Learn Functional Programming Using Haskell
by hellofunk on Tuesday August 02, 2016 @01:20PM
(#12211485)
> By learning PureScript I transfer the same skillset to the backend
do you mean "frontend" ?
Re:Show HN: Learn Functional Programming Using Haskell
by dmix on Tuesday August 02, 2016 @02:43PM
(#12212207)
No 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).
> 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)#Lim...
[2] https://github.com/elm-lang/elm-compiler/issues/396