DEV Community

Patrick Wendo
Patrick Wendo

Posted on

Sell Me on Elixir

I am a ruby dev. I see a lot of ruby devs going to elixir and a lot of comparisons being drawn between the two languages. I want to know why you think I should learn Elixir.

Top comments (9)

Collapse
 
katafrakt profile image
Paweł Świątkowski

Learning any new language is generally beneficial. And the farther in terms of paradigm it is from your current languages, the better. However, it's not mandatory and you should only do it if you want.

And Elixir is not a "Ruby on steroids". It's a different language with different practices and different ecosystem. This is an old blog post of mine, but it still stands.

Collapse
 
shigetorum profile image
Edge

it mainly depends on what you do with ruby, if its web development, you might wanna stay in Ruby, but for some specific services Elixir might be a good shot.

But overall you need to learn what you think will be good for your set of skills.

Collapse
 
codewander profile image
codewander • Edited

As an outsider, I would approach the topic with this question: what is my favorite ORM across all languages? Then I would consider the language and ecosystem around that ORM. This may or may not land you at Elixir.

Collapse
 
peerreynders profile image
peerreynders

That would be extremely limiting given that Elixir doesn't have objects and the prevalent relational mapper Ecto is unique to that ecosystem.

It's an ecosystem created by former members of the Ruby community who fostered similar values so Ruby developers tend to "feel at home" even though the technology stack is very different.

Beyond Functional Programming with Elixir and Erlang

Collapse
 
codewander profile image
codewander

Makes sense.

I would expand my question to relational mapper, if that avoids getting locked into oop.

I have been slowly comparing active-record, sqlalchemy, diesel, and prisma lately. I may end up including ecto in that comparison.

Collapse
 
codewander profile image
codewander

Some ruby devs have gone to golang. I am curious if former ruby devs would embrace a typed layer above elixir like caramel, if that ever takes off.

Thread Thread
 
peerreynders profile image
peerreynders • Edited

"the reason for not having static typing in Erlang was the absolute need for doing dynamic code upgrades of running systems."
source

"Typing Erlang is a hard problem!"
source

And Erlang has helpful error handling primitives for concurrent processing that Golang figures it doesn't need.

Collapse
 
bigmiau profile image
Javier Levio

Two words: Pattern Match.
It kind of blew my mind, coming from a Python/JS background, just how many things can be done using pattern match on elixir. It has been geniuenly a game changer to my coding style, and how to build solutions.

Collapse
 
antonrich profile image
Anton

Well, what kind of annoying trouble do you get with Ruby? One of the things I'm learning right now is Ecto. A library that handles database communication. I don't know Ruby, but as far as I know Ruby has Active Records. Active Records hides a lot of things so it's implicit. Ecto is explicit and has some interesting ways to handle lots of pain points. There's a book called Programming Ecto that goes more in depth.

In general, I'd say that Elixir is a very pragmatic language. No wonder, it's based on Erlang which was designed to be used in production under heavy load of telephone communications.

It's also a growing language with a strong community.

Another questions. Do you want to approach Elixir as a serious endeavor? Why not just dabble with it? Why not just play with it? Does one need convincing to play?

I think your own experience is way more important than words of other people.