2
TonyCox
3y

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
    I got interested in functional programming when learning Python. I read some books on functional in C++ and have been using in some fashion. So you don't need to change language. If you want to go all in then go for Haskell (https://www.haskell.org/).
  • 0
    Also, if you want to learn functional while playing minecraft then use Integrated Dynamics mod. It has functional programming system to control things. It is not text, but objects that represent different variables and things. That are combined to make expressions.
  • 1
    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
    @AleCx04 You are now a meme:
  • 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.
  • 1
    @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.
  • 0
    @AleCx04 I thought about that. But decided to stick to your quote. Both are good.
  • 0
    @AleCx04 Another one:

    I don't always program functionally.

    Sometimes shit don't work and I don't know why.
  • 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