Hi there!
I want to learn functional programming, and a "functional programming language" such as Elixir, Elm, Haskell, etc.
For you that are avid functional programmers, where to start?
Hi there!
I want to learn functional programming, and a "functional programming language" such as Elixir, Elm, Haskell, etc.
For you that are avid functional programmers, where to start?
For further actions, you may consider blocking this person and/or reporting abuse
Shafayet Hossain -
Ingo Steinke, web developer -
Antonio | CEO at Litlyx.com -
花间酒 -
Top comments (8)
Elm strikes me as a pretty good place to dive in because it:
Since you come from Ruby on Rails land, Elixir might be a good choice because it's sort of an offshoot from that ecosystem and has a lot of community crossover.
This is my answer as someone who tends to start with practical use cases and work down to theoretical.
@xtrasmal is a great choice if you are more of a bottom-up learner.
If you're a web dev, Elm is a great place to start. I followed the guide when I was first getting started at the beginning of last year, and having a blast with it ever since!
Hi there. Language apart, I'd like to point you to this resource
Category Theory for Programmers(github.com/hmemcpy/milewski-ctfp-pdf) or buy the book, because it is very good. It talks about composition. Here is a quote from the book:
"Composition is at the very root of category theory — it’s part of the definition of the category itself. And I will argue strongly that composition is the essence of programming. We’ve been composing things forever, long before some great engineer came up with the idea of a subroutine.
Some time ago the principles of structural programming revolutionized programming because they made blocks of code composable. Then came object oriented programming, which is all about composing objects.
Functional programming is not only about composing functions and algebraic data structures — it makes concurrency composable — something that’s virtually impossible with other programming paradigms."
The book uses examples from Haskell and other languages, as illustrations. So you will learn a little of that while you are at it.
When picking a functional language like Elixir, you will find that there is more stuff than just the language that are immensely awesome to tap in to. Like Elixir runs on BEAM, it is fault-tolerant(and other cool things), it has a framework called Phoenix for frontends(for example) and there is a thing called Nerves Project, which allows you to burn your code to an image for embedded systems.
What programming languages do you have the most experience with?
I would start by making sure to understand these basic concepts:
Next I would look at these well-known higher-order functions:
These are ideas that can be used in many programming languages. In particular, if you're familiar with python or javascript, all of the above topics can be understood and applied in a natural way in both of them.
Then you could go into topics that tend to be more relevant in really pure functional languages like Haskell (functors, monads, monoids, combinators...).
This series by Fun Fun Function seems to be a great start in understanding the fundamental concepts of functional programming for those with a background in JavaScript. I mean, at least it surely helped me understand them.
To others responding to this question:
I am a python programmer who wishes to learn FP.
In past I have "dabbled" with Elixir - Self learnt via their documentation, did Udemy course and also published a package on hex.pm
Then I "lost touch".
I recently came across coconut Being python programmer, I am intrigued.
My generic question (aside from choice of language) : What are your suggestions to adopt "Functional" mindset ?
Coconut looks interesting, I'll definitely check it out.
The Math-based Grand Unified Programming Theory: The Pure Function Pipeline Data Flow with Principle-based Warehouse/Workshop Model