I learned Elixir a few weeks ago as a quarantine self-improvement project and pretty much loved it. There are some warts, as in any language. As someone who's primarily worked in Go and Java in the past and has also been learning Rust I don't super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits.<p>But there are some great language features, like guards and pattern matching, that are hard to give up when you go back to other languages.<p>Plus it's great to have OTP goodies like GenServer at your fingertips if you run into performance bottlenecks (which you may not!). The OTP APIs are a bit weird coming from other languages but not too bad.<p>Other things I've liked:<p>1. Ecto is simply the best DB library I've encountered in any language. I'd almost recommend learning Elixir just to be able to use Ecto.<p>2. Plug provides great HTTP ergonomics highly reminiscent of Go's context-based middleware approach. Having direct access to the full request/response lifecycle is a win.<p>3. Phoenix is nice because it's essentially just Plug with some convenient helpers on top. Strikes a really nice balance between configuration and convention by letting you use only what you need. Haven't tried LiveView as I'd prefer to handcraft my own JS but probably worth a shot.<p>4. Absinthe is the best GraphQL framework I've encountered after many others in other languages left me completely cold.
The BEAM is a huge win: having lightweight threads means you can often do away with things like Redis for job queues and PubSub stuff. I love this answer on StackOverflow by Elixir's creator:<p><a href="https://stackoverflow.com/questions/32085258/how-can-i-schedule-code-to-run-every-few-hours-in-elixir-or-phoenix-framework?rq=1" rel="nofollow">https://stackoverflow.com/questions/32085258/how-can-i-sched...</a><p>So simple. Something that would require a job queue and a job runner fades away into a piece of the OTP application tree. When it crashes, it will even come right back up!<p>Phoenix feels a little too heavyweight for really small projects—maybe I'm spoiled having used Mojolicious's [0] single-file web servers. (Example on the linked page.) But for anything slightly larger, Phoenix scales <i>really</i> well. I work on a decently-large application in Phoenix for work and it's been an absolute joy to work with this langauge.<p>Typing could be better. Though, Dialyzer does a decent job of catching type errors. That's saved my neck on more than one occasion.<p>[0]: <a href="https://mojolicious.org/" rel="nofollow">https://mojolicious.org/</a>
Elixir is decent and I've worked with it a fair amount in production systems... Mostly Rubyists seem to really click with it. And ruby idioms are all over it - you can taste its history and proximity to ruby's ecosystem.
As a scala dev that ended up working with elixir for a couple years, my opinion is that a typesafe elixir-like language would really bring BEAM back into the mainstream. Akka is alright but it's shoehorned onto the JVM. BEAM is good as long as you don't need to do heavy computation, but lack of type-safety (need to use dialyzer?) means that shit breaks in prod that the compiler would have caught. And yes, you can mitigate this with boatloads of testing and data-validations with ecto or whatever. But every time we broke shit that a compiler would have caught I cringed.<p>It's a great path for rubyists to move to Elixir/BEAM and every rubyist should give it a whirl! I'm back working on scala and akka.
Elixir and Phoenix are living proof that functional programming can be easy - most of the time you just play with struct and functions, that's basically it. No need to pay attention to monads and type classes.<p>On the other hand, it also reflects functional programming is also more straightforward than Object-oriented programming because it's more objective to just model the data, than modeling the data and procedures at the same time. If you have two people writing the same thing, there's a much larger chance they'll yield similar or identical results.
If you're interested in using Elixir, jump right into Phoenix with LiveView. It is fantastic for prototyping new tools. Once you learn the basics of LiveView, it's ridiculously easy to create the web UI that interacts with your Elixir back-end.<p>For a while I was using Phoenix<>Elm as my stack and I enjoy programming in Elm. But there's a lot of boilerplate you have to tediously connect for every input and output on both sides of the server and client.<p>LiveView eliminates all that boilerplate by letting you write templates in Elixir that are macro-compiled to javascript. Getting rid of that boilerplate eliminates time writing it as well as time debugging the extra complexity that boilerplate introduces.
Started a little CRUD-app project in Phoenix (Ruby on Rails to Elixir's Ruby), and my expectations have been totally surpassed. It's pretty amazing.<p>Working with Elixir is really cool, too, coming from C++ & JS backgrounds. Pattern matching feels like a programming technique from the future.
Another person who liked Elixir, cool :)<p>Btw. If anyone is interested, I'm working on prettier plugin for html l?eex files. Probably gonna publish it next week.
I wrote two blog posts before on Elixir:<p>The first piece is longer, on my journey learning Elixir and building machine learning libraries.<p><a href="https://fredwu.me/blog/2016-07-24-i-accidentally-some-machine-learning-my-story-of/" rel="nofollow">https://fredwu.me/blog/2016-07-24-i-accidentally-some-machin...</a><p>The second piece is shorter, on Elixir’s functional aspect and how doctest changes the way I code.<p><a href="https://fredwu.me/blog/2017-08-07-elixir-and-doctest-help-writing-better-programs/" rel="nofollow">https://fredwu.me/blog/2017-08-07-elixir-and-doctest-help-wr...</a>
The only downside I've found with Elixir is that because of the language and runtime internals, it doesn't really lend itself to power serverless/lambda functions (like Python, Ruby, Go, etc).
I had an excellent week with Elixir building a really silly game:<p><a href="https://hn.lddstudios.com/" rel="nofollow">https://hn.lddstudios.com/</a><p>MIT Licensed. Source:<p><a href="https://github.com/ldd/hn_comments_game" rel="nofollow">https://github.com/ldd/hn_comments_game</a>
I built the API for a side project in Elixir/Phoenix a couple years ago making use of Phoenix WebSockets, and it was truly mindblowing how much you could get done with such a little amount of code.
Like the author, I'm really truly loving Elixir. I recently wrote up some of my experiences with Elixir/Phoenix coming from a Ruby/Rails perspective - <a href="https://medium.com/swlh/3-months-with-elixir-phoenix-2810f653f887" rel="nofollow">https://medium.com/swlh/3-months-with-elixir-phoenix-2810f65...</a>.<p>Curiously, unlike most others here, I'm not completely loving Ecto. I appreciate the philosophy and get changesets, but I'm finding the query syntax clumsy.
Elixir: So good that your team simply won’t believe your claims<p><a href="https://ekarak.com/2020/05/16/of-elixir-phoenix-and-analogies-to-the-prime-directive/" rel="nofollow">https://ekarak.com/2020/05/16/of-elixir-phoenix-and-analogie...</a>
The job market for Elixir is pretty small. Sure, there are a couple of people here responding with specific listings, but still. I was hoping it would have ramped up by now but it seems that it's going to stay a niche player.
The fact that it's a dynamic language make problems similar to Node / Python, can't dev serious backend services without a strongly type language. Not saying you can't, but you will have a lot of issues overtime that would have been catch at compile time.