What was the first occasion for you to learn functional languages?
I'm very curious what's the first occasion you decided to learn a functional language and use it in real world?
3.4K+ developers have started their personal blogs on Hashnode in the last one month.
Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more
I've started using Elixir beginning of 2016, and the reason is quite simple... Object oriented programming for backend sucks (IMHO). You really need the concurrency, fault tolerance, monitoring, logging, ... etc. Why not use a language that ships with all that out of the box, instead of dealing with dependency fatigue? I spent the same amount of time learning and writing a basic Elixir server as I did simply trying to figure out how RoR works its magic behind the scenes.
Look, I've already built the same backend in Python, Ruby, and even C++. It never 'clicked' so well as much as it did when I switched to Elixir. I dare say, Elixir felt like the simplicity of Node coupled with the power of C++.
With all that being said, what is my use case?
My use case is a realtime backend for a game. The game has a wide set of features, and require a very versatile language. Elixir had me covered on those parts.
What are other great traits about Elixir?
The tools around this language are super. Hex and mix your dependencies in a very simple manner (granted I don't like the .hex in the home directory. Makes dockerizing a pain). iex, debug printing, and syntax are all pluses for me, ever since I learned to write my logic in a functional manner.
The most appealing part of Elixir, however, was the micro-services approach it takes. It is just mind-blowing how you set up multiple applications and supervisors... within the same application! This allowed me to write a matchmaking server, a lobby server, a game server, all within the same code base, each managed separately. That, my dear reader, is just priceless for prototyping and eventually shipping your application.
Sorry for the rant, and unsolicited pitch to Elixir, but probably all other functional programming languages are just as good.
So I read some books about it, particularly "Mostly adequate guide to functional programming". Since then I try to make as much FP as I can, getting used with terminology and wrap my head around those concepts!
I do some Elm and Clojure for practicing with real functional & immutable constraints.
I am still in the process of understanding fully functional programming, but I must say that I am a way better developer now with FP than then with POO & Imperative!