6 ms·
If anyone's curious to try out functional programming, I would highly recommend Elm. I haven't been so excited about a language since I went from C to Ruby ten
by choxi 9y ago
If anyone's curious to try out functional programming, I would highly recommend Elm. I haven't been so excited about a language since I went from C to Ruby ten years ago, and Pragmatic Studios has a great course on it (I have no affiliation): https://pragmaticstudio.com/courses/elm https://pragmaticstudio.com/courses/elm
- cbrewster 9y agoI would also give a recommendation to elm. It is like a simpler version of Haskell and its relatively easy to build something quickly(no affiliation either). I always had a hard time wrapping my head around functional programming, but elm was easy to understand and shows off the strengths of a functional approach.
- deleted 9y ago[deleted]
- nijaru 9y agoAnd Elm is implemented in Haskell ;] I've been meaning to try Elm since I've been playing around with Haskell more and more. Purescript is relatively similar but allows you to build more than frontends. It seems Elm has grown quite a lot in popularity though.
- dmix 9y agoPureScript has great potential. I'm very excited for what it offers the future of Javascript and even Haskell. It's on a whole other level than Elm. The only problem from my experience trying to use it in a project is that since it's alpha software a) it's changing so fast that APIs/libraries are very unstable to the point they are almost unusable if you try to follow newish releases (this was 6-8 months ago, I hope/expect stability has improved) and b) you have to be intimately familiar with Haskell. As the OP's article describes about Haskell with PureScript the documentation situation is even worse, the documentation is 90% "hard" and 10% "soft". Which is fine if you know Haskell, or even a bit of Elm, but it's very tough coming in as a newbie of both Haskell and PS.
- melling 9y agoElixir is mentioned on the page too. Does it complement Elm?
- ShaneWilton 9y agoVery much so. I'm increasingly seeing more and more projects that use Phoenix (Elixir) on the backend, and Elm on the frontend. Here's an exciting example: https://github.com/dailydrip/firestorm https://github.com/dailydrip/firestorm
- leshow 9y agoI think a lot of Haskeller's will find Elm's type system to be limited and frustrating. Even for simple things the solution in Elm is that you have to write a bunch of boilerplate.
- proaralyst 9y agoI had this experience. However, starting out I think it'd be a much more gentle introduction. For other haskellers, Purescript seems to solve this problem.
- leshow 9y agoI haven't gotten to give PS more than a cursory look but the row polymorphism and structural typing seems to really compliment JS semantics.
- pivotal 9y agoI spent some time working through various Haskell books with varying success, then decided to do a code challenge (adventofcode.com) using Elm. I didn't finish, but after writing Elm for many days on end, suddenly Haskell clicked a lot more. The Elm compiler is far more friendly than Haskell's and will walk you through a lot of rookie mistakes and oversights. I find Elm exciting, and with the prevalence of React/Redux these days, a lot of front end developers would be wise to familiarize themselves with the origin of many of the concepts borrowed from Elm.
- nickpeterson 9y agoI bought a few Haskell books but could never really grok it. In the last couple years I started learning f# and have found it's an incredible "intro to Haskell" language. I opened one of my Haskell books the other day and realized I understood everything much more quickly.
- ode 9y agoThe same is true of OCaml.
- insulanian 9y agoF# is a beautiful, pragmatic, functional programming language. It's a shame some people dismiss it due its Microsoft origins.
- nickpeterson 9y agoYeah, F# feels like Don Syme looked at ocaml and haskell and applied a bit of yagni and tossed in some other useful conventions (I'm sure many others were involved as well). It drives me crazy that Microsoft doesn't push it harder from an investment perspective. They don't even write books about it :)
- comp1927 9y agoThere are books out there. For new language adoption, F# do have new features like Type Providers. However, it's not the best language in X for X in ['data science', 'distributed system'] etc.
- tmountain 9y agoI concur with your suggestion. As a longtime functional programmer (Lisp, Clojure, Erlang), Elm is one of my favorite languages of all time. I'm hoping to jump into Haskell next, and I feel like it's a great transition in that direction.
- salimmadjd 9y agoElm is also my gateway drug into functional. And Pragmatic Studio was a great start. Monads then seemed much easier to understand after Elm and reading this: http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...
- runeks 9y agoSide bonus to using Elm on the frontend: if your backend is written in Haskell, you can derive Elm types and functions to query your backend, giving you type safety from front to back. https://hackage.haskell.org/package/elm-export https://hackage.haskell.org/package/elm-export https://hackage.haskell.org/package/servant-elm https://hackage.haskell.org/package/servant-elm