2 ms·
I've been playing around with Elixir and rewrote a small Rails app in Phoenix to get used to it. In the end, the benefits are not big enough to make the switch
by toberoni 7y ago
I've been playing around with Elixir and rewrote a small Rails app in Phoenix to get used to it. In the end, the benefits are not big enough to make the switch
Pros:
- Less magic. It's a lot easier to figure out what's going on under the hood.
- Phoenix is an improved Rails. Ecto is more flexible, the generators make more sense and everything is better organized.
- FP leads to cleaner code. The difference to a neatly organized Rails (with POROs & service objects) is not big though.
- Tooling/Mix is excellent.
- Elixirforum is a great place full of helpful people.
Cons:
- Small ecosystem and lower productivity. I often had to spend 1-2 days to write a feature where with Rails I'd download a gem and it's done.
- Elixir gets hyped up due to BEAM, OTP, stability, fault tolerance... - however, apart from some very niche cases most of its features can be replicated with background queues, Kubernetes, etc.
- Speed & hosting costs. Elixir is a bit faster than Ruby and the footprint is smaller. But a powerful VPS + CDN is so cheap nowadays that it doesn't matter much at my scale.
- It's an absolute niche language. There aren't many tutorials, SO answers or solutions for small problems - you often have to figure it out on your own.
Overall I'd say that Elixir is fun to work with and ist well thought-through. At the end of the day I only care about shipping products though. Writing my admin backend in clean FP code is nice, but I rather download a gem like Administrate and be done with it - so I have more time to focus on my core features.
From a business perspective I don't see many cases for Elixir: A small shop is more productive with Rails/JS/Python due to the vast ecosystems - and a bigger company will have trouble finding enough devs.