Ruby / Elixir connection

What (and how strong) is the Ruby/Elixir connection beyond syntax inspiration? That is, can Ruby programmers generally pick up Elixir coding in no time? Also, while I’ve read Elixir addresses a different problem space (massive concurrency and more functional style in addition to a factor or more of speed increase) when is Ruby a BETTER fit than Elixir? Is there anything you simply wouldn’t / couldn’t use Elixir for where Ruby would be a good fit?


Beyond syntax, Elixir is functional and ruby is object oriented. How easy you can pick it up would depend on how easily you can make that transition. Also, getting used to managing states in actors is a different enough idea to take some getting used to.

I don’t think I can make a fair comparison for when ruby would be a better fit. I suspect that BEAM and elixir are overkill in scripting scenarios. But I don’t have much Elixir experience and haven’t touched Erlang in years. Someone else may have a better perspective on that.

1 Like

Well the first advantage I can think of right now is that Ruby is much more mature, developed and has a way larger community.

I’m not very familiar with Ruby (I had actually started learning it a month prior discovering Elixir and then completely dropped Ruby in favor of Elixir) but I don’t think it helps that much to pickup Elixir. It’s imperative/object oriented versus Functional and that makes them very different. Besides Ruby I know Java, C, Haskell and Erlang and these last two definitely helped me understand and pickup Elixir way more than Ruby, Java or C.

1 Like

Elixir was, in part inspired by Ruby (José himself being a prominent member of the Ruby community - he also wrote one of the most used libraries, Devise).

Although on the face of it many think the syntax was inspired by Ruby, I would say it was actually inspired by a more fundamental principle - of developer happiness and a system that ‘just makes sense’. Of course the syntax is itself inspired by this, but it goes beyond syntax.

Having said that, I think José has also tried to stay true to Erlang and this certainly shows when using Elixir.

When would I use Ruby? When I don’t need Elixir :lol:

When I write a script for the server, or need to put a site up quick, or have a smaller project in mind I would use Ruby. Mainly for two reasons: I know it, and there is a huge community/set of libraries out there. Chances are if you want to do something someone already has in Ruby.

That may well change as I learn Elixir. I’m hoping it does actually, as my brain can’t hold too much information so sticking to one language would be preferential for me :044:


That was at least part of where I was coming from in raising the original question. I used to code pretty near everything in C or shell script, not so much because they were always perfect but because they were “good enough” (C generally more than good enough in speed; shell generally more than good enough in concision and string processing) and using them saved me a lot of time trying to cram another language into my brain. At the moment there are so many languages out there, promising so many “advantages”, I am having a hard time picking one. Adding to the problem, when I do buy some books and try to settle down to study I generally find some significant problem with each of them: too hard (Haskell); too dependency/library ridden (most of them); too slow (JVM…at least to load); no gui; poorly documented and/or buggy; unhelpful user community (Java); clearly going nowhere or already obsolescent, etc. Yeah, I guess I’m getting picky! :slight_smile:

1 Like

I guess it depends on what you want to do? Elixir will I’m sure, over time, be just as good as Ruby in terms of community/libraries (perhaps in part because it’s culturally very similar).

I would let the benefits that are important to you - drive your choices in a language, while of course making sure it is one you enjoy, or better still, love! :003:

AstonJ, but in theory - in your opinion, at least - there isn’t anything ruby can do that elixir won’t, in time, be able to do a “good enough” job in, at least? I’ve never heard ruby criticized in terms of flexibility - only, sometimes, in terms of speed. Mostly I hear how the people who use it find it fun. If Elixir inherits the “fun” it should have quite a future. Thanks for the response.

1 Like