I also like this post by Rafał Radziszewski in response to this answer in a Quora session with DHH:
(Jump to the last paragraph if you’re feeling lazy)
Short answer: yes, it’s definitely reasonable assumption.
The main thing about Elixir is that it’s not like Ruby at all. When I was about to start using the language, I had the opportunity to talk to Jose Valim (language creator) on a conference and I asked him what his advice was to start with. At the time I was a RoR dev with a year of software house experience and a few projects on production already done. He told me: “you must remember, that it looks like Ruby, but it’s not Ruby at all”. Though simple, it was the best advice I have ever received.
First of all, Elixir is functional. Not getting into formal definitions and stuff, what it means is you’re going to write code in much different way that before. No longer will you iterate over array changing it elements one by one and then return the same array. No longer will you mutate state of object(struct). No longer will you create hierarchies and inherit stuff. What this means is many ways you used to solve problems will be no longer available to you.
Personally, it was not that hard for me, because as it turned out, I started to do quite a lot of things in functional way in Ruby before. For me, it was quite often simpler and more “natural” solution, but I know quite a lot of people who had issues with that - depends on how your brain is wired I guess.
Second thing is, you’re going to need to learn new ways of doing stuff. Pattern matching, map, filter, streams. Grokking the fact that “=” is now pattern matching, not assignment and the consequences of that. Getting used to tuples and structs. Using modules as main code entity. The list goes on and on.
Third thing is getting to know Beam VM. This means understanding Elixir model of concurrency, grokking processes, understanding how to use GenServers. This is fun, but might take you a while to process. Most of the people are not used to thinking of your code in terms of different processes and async operations. I know I wasn’t. To this day I do not consider myself proficient in that area.
So the question you have in your mind now is probably along this lines: “why bother”? Why would you spend so much time relearning your basic problem solving skills instead of being productive in what you already know?
In my case, the answer is: it is SIMPLER. Yeah, really! Once you start grokking this thing, it will time and time again prove to be easier to do stuff. You want to know why some function does not behave in a way you think it should? You check the source of the FUNCTION. You do not care about state, you do not care about previous operations. You just check the function.
You debug stuff? It’s easy to see what’s going on in any given state. Variables are immutable, so you know for sure what is the state of one for a given set of starting parameters. You just need to add breakpoints along the way to see where it stops behaving like you wanted and the error is likely to be easy to spot.
You decide that you want to refactor? Cool, because it’s just functions. You can move them around and fix namespacing. There is no state you need to be worrying about.
Finally, you want some concurrency? You’re welcome. Adding messaging feature to your app is a day’s work, and that’s only because frontend takes some time usually. It’s so simple. The same for adding some temporal storage and many other features. Finally, you can keep state in isolated areas, that you make as simple as possible and about which it is quite easy to reason. Actor model is a sensible solution. Concurrency is fun, instead of terrifying.
And when we get to frameworks and libraries - Phoenix is simple too. No monkey patching. No over-abstracted functions nobody understands without spending an hour staring. No hidden state and no gotchas. Just a bunch of functions tied together, that’s how simple it is.
So yeah, I believe more people will move to Elixir. Not because it’s more performant (though it is and it means that you have longer run before you actually need to start optimizing), not because VM has nice features (though it has, hot-deploys possibility being one of them), not because you can actually write efficient concurrent code (though you can and using one of top industry solutions). I believe people will move, because it’s actually simpler. Simpler in a good way, like Unix is in many ways simple. And simpler means less time for wondering “what the f*** is going on here” and more time for actually writing cool stuff. [/quote]