3 ms·
I honestly don't understand why Elixir and the Erlang/BEAM ecosystem haven't taken over the software world more completely. It is inconceivable to me to begin
by jononomo 4y ago
I honestly don't understand why Elixir and the Erlang/BEAM ecosystem haven't taken over the software world more completely. It is inconceivable to me to begin a new web app using Ruby on Rails when I could use Elixir and Phoenix.
- jononomo 4y ago1. 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.
- nickjj 4y ago> I honestly don't understand why Elixir and the Erlang/BEAM ecosystem haven't taken over the software world more completely I thought similar things in 2016 when I started learning Elixir and Phoenix but after 2 years, building multiple apps, dabbling with it for years afterwards (up until about last year) and giving it everything I had (and more). It wasn't for me. The conclusion I came to was Elixir makes certain things that are hard in other languages easier and there's certain things in other languages that are simple but much different in Elixir. For the apps I build (typical web apps like GitHub, etc.) I found that I ran into more scenarios where Elixir as a language made it harder for me to build the things I wanted. For things that Elixir made easier, other languages have "good enough" solutions. If the goal of all of this is to build things to provide value for others, choosing a stack with a larger ecosystem of tools and community support wins in my book when you've reached the point of "good enough" in other things. Responding back in <= 100ms for the p95 case is "good enough" and most web tech stacks can do this without a huge amount of server costs or extra effort if you're talking about million dollar business sized apps where you might be dealing with a few hundred thousand visitors a month for a typical SAAS app. Things like Hotwire[0] are also tech stack agnostic. You can build really nice feeling apps with minimal effort. I spent about a week upgrading one of my apps to use it while learning as I went and it made a massive difference. Conceptually it was low effort to understand and didn't require rewriting everything. That has been the polar opposite experience I've had when I used LiveView. [0]: https://hotwired.dev/ https://hotwired.dev/