4 ms·
I tried to learn FP multiple times by learning haskell. Never clicked, tried clojure and I was productive after roughly 2 days.
by Random_ernest 6y ago
I tried to learn FP multiple times by learning haskell. Never clicked, tried clojure and I was productive after roughly 2 days.
- lonelappde 6y agoFor the 99%, Haskell's purpose is to teach you what to hate about your working language, not to be a working language. https://blog.plover.com/prog/haskell/what-goes-wrong-2.html https://blog.plover.com/prog/haskell/what-goes-wrong-2.html
- rkangel 6y agoHaskell is very much the deep end of learning functional programming - it's at an extreme end of the spectrum in purity and type system. The language I recommend as a first step to most people is Elixir (or Erlang). It's fairly pure, data is immutable, relies on recursion at the lowest level etc. Good code in Elixir is structure in a similar to good code in a lot of other functional languages (and so teaches good habits), but being dynamically typed is avoids that immediate pain of learning about how to keep the compiler happy.
- dan-robertson 6y agoAs a counterpoint, I picked up (some) haskell pretty quickly. I read a lot of code and didn’t get bogged down reading explanations of what a monad is. I also avoided trying to understand too well what the evaluation semantics of the language were. When I read code, I focused on looking at the type signatures and understanding what they meant, then I would stare at the code and try to work out in my head why those definitions would get those types. I did this at a time when there were lots of “I wrote a program in Haskell. Let me explain how it works” blog posts on this site. I defined some data structures and solved a bunch of project euler problems as practice
- akegalj 6y agoI would second this. My experience is that people get scarred of so much new terms which get introduced in Haskell and that could feel overwhelming. When beginning with Haskell, I would advice to just write code and try to intuitively understand bits, but not get down into unwrapping things or theory much. Stay high level and figure out how things interact as you would do in black box model. Don't open the box, but poke it and see what result you will get (in other words; just write code and do trial and error). When you get comfortable with black-box learning then open the box and look for the details.