2 ms·
1. Once I got the hang of the functional programming paradigm it suddenly felt like a huge weight off my shoulders. I love never thinking about objects and the
by jononomo 4y ago
1. Once I got the hang of the functional programming paradigm it suddenly felt like a huge weight off my shoulders. I love never thinking about objects and the OO approach.
2. Concurrency is built in so thoroughly that there is an entire framework called OTP that provides powerful tools and supervisor processes and so forth to really take concurrency to the next level.
3. Once I got the hang of OTP, similar to when I got the hang of functional programming, it felt like a huge weight off my shoulders again. OTP makes concurrency so easy and lightweight that you think nothing of spinning up three dozen processes just to handle some trivial calculation or data transformation -- processes are like objects that are actually alive and useful and doing things, and OTP is like an orchestrator.
It just feels to me like everything is clearer, simpler, and more robust when I use Elixir and the BEAM/OTP ecosystem.
Also, writing a web application in Elixir means writing a program that you then fire up and which stays up until you bring it down or it crashes for some reason. In Rails on the other hand, you write a script that is fired up every time an http request arrives, builds it's entire context for everything, handles the request, and then dies split second later, only to start the whole process over again a split second after that. There is a certain simplicity in only firing things up once and then just keeping your context alive in perpetuity.