I’m coming from Ruby, where I’ve been a ruby-core member for 12+ years. I’ve meant to look at Elixir since its early days.
Three months ago I decided it was more than time to dive into it.
I took a 3-day weekend to look at it. I checked out exercism and did one “easy” exercise, a “medium” one, all the “hard” ones that I found interesting. I was ready for the next step.
I sent an email to 4 companies looking for elixir devs stating I had 40 years of programming experience, including a whole 3 days in Elixir and that I was looking for a remote and half-time job. Nowadays the “remote” is almost taken for granted, but “half-time” is still a major blocker. Nevertheless, I got a great offer from Súper and I love it there
Grapsing the bulk of the language was very easy for me; I had been using some immutable structures in Ruby before (parser
gem, Ractor
, …).
There is still a lot of fine print I need to understand
I really like my experience so far. The community is vibrant, and the lightning-quick feedback from José Valim is simply fabulous (this is actually an understatement). I wish my experience contributing to Ruby had been comparable but I have to admit it is has not been the case at all.
To my friends, I joke that my main irritant with Elixir is its disdain for trailing commas; I guess that’s not that bad
My other reservations (with less than 3 months under my belt) concern two aspects: keywords and macros.
-
Keywords.
I am aware of a few cases where they are actually used for what they are (an ordered list), but typically there’s an ambiguity with maps that bothers me. Many API accept both, but not all. The syntax for keywords seems too convenient compared to it’s actual use (no pattern match, no defaults, difficulty in being strict about repeated ignored options, …). I miss Ruby keyword parameters. -
Ast & macros.
There’s something beautiful with the fact thatif
and|>
are macros. It makes working with the language itself problematic for me and introduces difficulties that look accidental (e.g.select [:id, :name]
works butselect ~w[id name]a
requires a^
because~w
is itself a macro.
In my mind,[:id, :name]
and~w[id name]a
are completely equivalent, so arefoo |> bar
andbar(foo)
, and I wish there was an intermediate AST representation that reflected that. Maybe there’s a future for a “semi-expansion” function that would assume things are as they seem and expand builtin macros like|>
and~w[]
, resolve module aliases, etc.
My involvement withRuboCop
and the Rubyparser
gems made me desire a world where I could know statically ifx.flat_map
referred toEnumerable#flat_map
or just another method with that name; while Elixir kind of brings that to the table, it also makes everything less straightforward. At least I’m having interesting discussions withsourceror
's author:-)
My biggest practical issue so far has been how often I have to wait on the compiler on my aging machines (4 and 12 y.o.), so this has been my focus in terms of contributions so far.