3 ms·
Elixir is Erlang with some Ruby-like syntactical sugar that vanishes when you look very close at it but makes the transition very easy. It's not like moving to
by pmontra 12y ago
Elixir is Erlang with some Ruby-like syntactical sugar that vanishes when you look very close at it but makes the transition very easy. It's not like moving to Erlang or Haskell or OCaml coming from procedural languages.
I have experience with Sinatra and Rails and I did a small project with Elixir and Phoenix in September. My bet before looking at the benchmarks was Phoenix >> Sinatra > Ruby, and that's the way it turned out to be. I was curious about how Martini and Node would compare.
That said, I enjoyed developing with Phoenix and it's really similar to Rails in its structure. The differences are about having views+templates (decorator pattern) instead of Rails' plain views (which would be Phoenix's templates) and having first class handlers for websockets. The developers of Phoenix answered quickly to all my questions and to the issues I opened on GitHub (it's still 0.x software in heavy development).
Anyway I still can't use it to replace Rails in the projects I do for my customers. There many reasons for that, some about Phoenix and some about me.
1) There aren't enough developers and it won't be wise for a customer to become too dependent from me (or any other developer)
2) There isn't an ecosystem comparable to the Rails one yet. Example: it can take forever to develop a replacement for all the basic functionality a Rails developer gets for free from a gem like devise (everything that revolves around authentication).
3) There might be many useful tools from the Erlang world but it takes time to learn them and become decently productive with Erlang and Elixir. How to make decent money while going back so many years productivity-wise? Obviously this applies to any transition to any ecosystem.
4) Performances usually don't matter at all: most servers have to sustain only low loads and Rails is good enough for that. In 20 years I probably had to work with only two web applications were speed really mattered. One was done with Java, the other one was PHP+Java and it was constrained more by the db than by the frontend. However I would consider Elixir right now for any heavily concurrent server, let's say a game server with thousands of players.