4 ms·
I learned some Haskell years ago but it didn't stick with me. Lately, I want to get back into functional programming to see whether I'm missing out on something
by m_a_g 4y ago
I learned some Haskell years ago but it didn't stick with me. Lately, I want to get back into functional programming to see whether I'm missing out on something. This book looks nice, and so does OCaml. Any suggestions on books, courses, or resources on this subject?
Also, just to get proper motivation, why should I learn functional programming as a capable Software Engineer?
- kubb 4y agoYou can strengthen the skill of thinking about your programs in terms of higher level abstractions, which allows you to have an overview and reason about larger systems.
- yakak 4y agoDan Grossman's Programming Languages is a great 3 language online course. It gives you the opportunity to compare standard ML, ruby and racket. Before that course I was already grouping languages by inheritances from C or Lisp families, but really started to recognize and appreciate ML more.
- bhrgunatha 4y agoBerkeley's Programming Languages and Compilers references this book and you get to apply OCaml to something non-trivial. https://inst.eecs.berkeley.edu/~cs164/fa21/ https://inst.eecs.berkeley.edu/~cs164/fa21/
- tgflynn 4y agoIt doesn't appear from your link that the course materials are available online though.
- bhrgunatha 4y agoOn the schedule page, there are links to further material. I don't think you can do the drills or exams, but you _can_ do the homework if you have a github account.
- tremon 4y agoYou should learn multiple paradigms to broaden your horizon, so you are able to approach a problem from multiple angles and decide on the best design approach. I don't write in a functional language in my day job, but I'm much more aware of global state and side-effects in my code than before. We mainly write in Python and C#, but I encourage my team members to dabble in SQL (for dataset manipulation) and Haskell (for functional purity). If anything, it makes them understand LINQ better.
- ufo 4y agoFor Ocaml in particular, one thing that is pretty cool about it is the module system. Although we unfortunately can't use this module system in other languages, it taught me some interesting lessons about abatract data types.
- ufo 4y agoAnother thing I recommend everyone to learn at least once is sum types aka algebraic data types. And how they are the dual to class based dispatch (what some call the "expression problem"). Sum types aren't exclusively found in functional languages, but they are certainly prominent in them.
- mejutoco 4y agoIMHO the main reason to learn functional programming is to learn to untangle state and behaviour.
- yawaramin 4y agoThe OP is a great book to learn OCaml. There is also a corresponding set of lecture videos on YouTube.