The class you have been waiting for. It is your programming class in school and the professor offers you plenty of interesting and essential words: objects, classes, constructors, inheritance. You love programming! And that’s programming, right? Well, that’s one way of structuring your program. And a very thought-provoking way, as object-oriented programming feels quite natural to most people.
Later on, you got a job to work with Erlang, this programming language that you certainly did not learn in your classes. Erlang is a functional programming language. It’s not that is better or worse than Java or C++. It’s just different as it has a different paradigm. The thing is you have no classes, no constructors, no methods, no inheritance, and all the concepts you had learned as simply “programming”. You try to use the same techniques you know but it just seems off.
You have to start thinking functionally. Not imperatively. Not object-oriented. This asks for a mutable mind. A mind that will have to sometimes shift between paradigms and understand fully all the differences between them. Immutability is a central concept of functional programming, but a mutable developer, that is up to change, is essential for learning a new paradigm.
Here are some tips for you to consider when learning FP:
The process to learn functional programming can be daunting and slow as new concepts are involved. It is not like learning Ruby from a Java background.
It actually is like learning how to sail a boat knowing how to drive a car. It is completely normal to struggle at first, but mutate your mind to resiliency and always keep learning.
Also published at https://dev.to/vnbrs/functional-programming-asks-for-a-mutable-developer-355l