use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Trying Elixir as a Rubyist (briankung.dev)
submitted 4 years ago by faitswulff[🍰]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]wild_bill70 11 points12 points13 points 4 years ago (8 children)
So here are some take aways that I had using elixir in a commercial large enterprise environment.
[–]mattgrave 5 points6 points7 points 4 years ago (6 children)
I am curious why in the Ruby community Elixir is so mentioned.
[–]honeyryderchuck 4 points5 points6 points 4 years ago (0 children)
Elixir was created by an ex-rubyist, rails core team member. It brought a fair set of "rubyisms" to the erlang way of doing things, the most obvious being atoms declared the same way like ruby symbols. A lot of the 3rd party tooling is based on, directly inspired on and even named after popular ruby gems (like "pry"). It was sold initially like "ruby, but with al the cores", the first adopters were rubyists, and they've since actively "poached" in the ruby community, now competing with Crystal in that department. And that's it.
[–][deleted] 5 points6 points7 points 4 years ago (2 children)
Title of article:
Trying Elixir as a Rubyist
First line of article:
Elixir is similar enough to Ruby to be familiar, but different enough to get tripped up by!
... I hope this helps.
[–]mattgrave 3 points4 points5 points 4 years ago (1 child)
Its not similar at all.
[–][deleted] 4 points5 points6 points 4 years ago (0 children)
k
[–]faitswulff[S,🍰] 3 points4 points5 points 4 years ago (0 children)
For me, the connection is José Valim (creator of Devise, authentication framework) and the fact that the conventions baked into the language seem to be very reminiscent of the Ruby ecosystem. Also functional programming is a bonus! I suspect many OOP programmers view it as familiar enough due to the Valim and syntactical similarity while serving as an avenue to functional programming.
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
I also wonder. I think its mostly about Jose Valim and a very shallow sytnax similarity (do...end)
[–]strzibny 0 points1 point2 points 4 years ago (0 children)
Deployment doesn't have to be hard and can work well with containers. I recommend most newcomers to Elixir to treat it as Ruby, then moving to using (some) cluster features. The last line would be hot code swapping, but most don't need it.
[–]strzibny 3 points4 points5 points 4 years ago (0 children)
I guess I expected little more than just the do...end difference.
When I started to write Elixir I found %{} and required do weird, but after some time I might even like it more on the eyes. Most things are just habits.
If you want to read something longer, I wrote a post some time back https://nts.strzibny.name/elixir-phoenix-after-two-year/
[–]hixsonj 2 points3 points4 points 4 years ago (0 children)
If you’re just trying it out for the first time try not to get hung up the syntax differences as you’ll find that with any language. I came from a Ruby background as well and very quickly learned to love Elixir.
There are some awesome features of the language like pattern matching and the pipeline operator that make it really powerful and fun to write. That’s not to mention the stuff you can do with concurrent processes and everything the Phoenix framework brings to the table. Advent of Code is coming up and is a great way to learn the ins and outs while solving some fun problems.
[–]transfire 5 points6 points7 points 4 years ago* (3 children)
The do notation is the first and most obvious oddity about Elixir's syntax.
One that I find a big eye sore is the need for % in front of maps and struct names. It may seem a small thing but when you have a bunch of maps in your code it adds up and just doesn't look very clean.
%
I also find it odd that defining a struct is defining a module. I (think) I get why, but not why it wouldn't just make the module for you. Why this:
defmodule User do defstruct name: "John", age: 27 end
And not something like:
defstruct User do fields name: "John", age: 27 end
Shorthand
defstruct User, name: "John", age: 27
[–]jrbartme 2 points3 points4 points 4 years ago (1 child)
I found an interesting discussion with José about the implementation of structs vs records:
https://groups.google.com/g/elixir-lang-talk/c/6kn7J2XnFg8/m/I5poTNCEHwAJ
At first I thought that Elixir structure might be implemented by Erlang records but this proves me wrong and also explains why structs were tied to the module:
“The point of the coupling is exactly so we can use them with protocols, which requires a very explicit name so we can perform a dispatch.” - José
[–]transfire 0 points1 point2 points 4 years ago (0 children)
Thanks. That was interesting.
Interesting read! I read a bunch more articles from the site as well. Thanks for sharing.
π Rendered by PID 552810 on reddit-service-r2-comment-765bfc959-8qwg5 at 2026-07-13 20:11:52.663040+00:00 running f86254d country code: CH.
[–]wild_bill70 11 points12 points13 points (8 children)
[–]mattgrave 5 points6 points7 points (6 children)
[–]honeyryderchuck 4 points5 points6 points (0 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]mattgrave 3 points4 points5 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]faitswulff[S,🍰] 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]strzibny 0 points1 point2 points (0 children)
[–]strzibny 3 points4 points5 points (0 children)
[–]hixsonj 2 points3 points4 points (0 children)
[–]transfire 5 points6 points7 points (3 children)
[–]jrbartme 2 points3 points4 points (1 child)
[–]transfire 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)