2
TonyCox
4y

What's the easiest functional programming language for someone with experience with imperative languages?

I would like to learn a functional language to broaden my horizons. I have knowledge of Python and C / C ++ and I want the language to be easy to learn from someone who comes from the imperative realm of languages. I don't care if the language is strong enough. I just need a language to learn the basics of a functional programming language, and then I'll try to find a more complex (and powerful) one.

thank

Comments
  • 0
    If you want to really learn fp, go all in with Haskell. There’s no crutches to fall back on different paradigms. It’s pure. I recommend learning Haskell via this course: https://haskell.mooc.fi/

    I really recommend F# tho. There’s no better functional first language out there. This https://fsharpforfunandprofit.com/ is the best resource out there, to learn both the language and many fp concepts.
  • 0
    I started functional programming with a non pure language like common lisp, later moved to Clojure and now I am with Scala. But if you reaaaaaally want to be pure fp all the way to the bottom till you reach turtles, then haskell.

    I seldom apply functional concepts tbh, it was more of an academic excercise for me.
  • 0
    Functional screams c with namespaces for me. Is it just me?
  • 1
    I'm very happy with OCaml personally.

    It's very functional, but has imperative stuff you can fall back on if you need to. I find generally not every problem can be addressed by functional programming cleanly (or by any one paradigm really).

    Lisp is also quite good IMHO. I personally am a big fan of Racket.
  • 0
    @Demolishun aww man i thought it was going to say "I don't always fp, but when I do it is Haskell" but i still liked it.
  • 1
    I used to advocate Haskell, but now I'm not convinced it's the best way to learn FP. It goes a bit too far into type theory and advanced abstractions for the average beginner. The core ideas of functional programming are quite simple.

    I've been using Standard ML quite a bit for a year or so now and it's really really nice. Simple enough, academically rigorous, and yet very expressive. They use it to teach FP in quite a few places. If you want something a bit more industry friendly, OCaml and F# are both very nice SML derivatives (so is Haskell but it has a few fundamental differences). For web stuff, Facebook has ReasonML. It's also pretty fast if you use the MLton compiler, while SML/NJ has the nice repl and stuff.

    This is a pretty nice book on SML basics http://cs.cmu.edu/~rwh/isml/...

    Another really, really pleasant language and learning environment is Racket, which is arguably even more beginner friendly than SML.

    And finally, modern JavaScript uses a lot of functional programming concepts, so you should be able to find some decent FP tutorials in JS.
Add Comment