AstonJ
Why Elixir?
It’s been a couple of years since we’ve had a thread like this, so here’s the 2018 edition ![]()
- Why are you using (or loving!) Elixir in 2018?
- Which resources do you recommend that do a good job of highlighting the benefits of Elixir?
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project.
My initial shotgu...
New
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #performance










First 10 of 14 Posts
AstonJ
I’ll start with something that is fresh in my mind - the opening chapter (and preface) to Programming Phoenix
It made the hairs on the back of my neck stand up!
You can read both the preface and the introductory chapter for free!
Here are some of the topics it covers:
And…
Obviously these are with Phoenix in mind - but then, Phoenix itself is the perfect tech to showcase the draw and power of Elixir
If you’ve not read these chapters you are truly missing out!
Read them for free here:
Qqwy
The main reason for me to love Elixir (and use it in Production!), is that Elixir is built with developers in mind:
And secondarily, the ability to reason about concurrency and distributed systems by using the BEAM’s implementation of the Actor Model and supervision trees means that:
dwahyudi
FallbackControllerin Phoenix is really nice to have.Every videos from Elixirconf.
skanderm
Learning to write Elixir has felt a bit like gaining a superpower.
So far, multi-clause functions and recursion-related micropatterns have helped me come up with simple solutions to otherwise difficult problems.
Aspirationally, I like the idea of quickly building things that both just work and that can scale far beyond what I could figure out in another language.
AstonJ
This is also another superb resource, it covers the story of Elixir while highlighting many of its uses…
dbern
I would really love to collect some thoughts on this too so I can help companies not be afraid to adopt Elixir.
My big draws are Maintainability and Scalability
Maintainability
I watched the micropatterns talk, and Cameron really helps put to words the enjoyable parts of Elixir for me.
The quote from Scott Wlaschin was really insightful as well:
What I take this to mean is that you attack small and large problems the same way in FP and Elixir, so problem-solving approaches are generally very consistent. For example, since Elixir is immutable, functions will transform data instead of leveraging state mutation where you can call a method on an object, and the object changes itself and/or other objects or their state that may not be in the same context of the developer. Over time all these OOP side-effects are forgotten and it becomes “less maintainable”. I don’t have to shift my problem-solving paradigms from “methods” to “objects” when it’s time to scale the solution.
Another point I thought was really helpful is that Elixir and pattern-matching tends to help developers architect for happy-paths. I’m not very familiar with railway-programming, but the idea that I’m gleaning from it so far is that we want to develop for the happy path, and tend to forget the unhappy paths, which is where our bugs usually show themselves. In Ruby, I usually encounter this as
NoMethodErrorand always handlingnilwhich makes it harder to grok the code.This is a simple example, but I could add more pattern-matching clauses to help me report better errors, or redirect the unhappy path to another process to make it happy.
Lastly about maintainability, because the Elixir community generally frowns upon meta-programming, you encounter less DSLs which are layers of misdirection. Rails is a huge DSL, so knowing Rails isn’t the same thing has knowing Ruby; knowing ActiveAdmin isn’t the same as knowing Ruby, but Plug is just elixir functions.
I think this leads itself to Elixir codebases generally being more maintainable. Would others agree? I feel that way so far, but I don’t have any psychology or data to prove that yet or make a point.
Scalability
My approach to creating software to solve a problem usually starts with having an idea for a solution. That solution starts small, but then as I dig into it, I realize it’s more complicated than I imagined, and that I might want to solve other domain problems at the same time.
If I chose something like Rails, I would have this feeling of impending doom that my app will get slow or is already slow, and then I’ll have to spend some time in devops to solve that problem; I’m not interested in devops like I am creating software. Whether that feeling is true or not is a different conversation-- I just feel that. I’ve also experienced issues forcing me to optimize old Rails code because it allowed my coworkers and I to be lazy with our SQL queries and architecture. If this app is commercialized, the company with that solution now has to determine what it has to do in order to keep growth going in order to meet goals. The question always comes up, “should we do a rewrite?”. A rewrite is rarely the right commercial answer, but developers at that point probably want to try new ideas in a safe place, and sometimes in a new language, so they’re really, really, really tempted to do a rewrite. A rewrite may the right professional development answer for that developer. Those opportunities don’t come often.
If I chose something like Elixir and Phoenix, I’ve never yet gotten the feeling of impending doom. I have felt the need to rearchitect some code, especially when Phoenix 1.3 released with DDD as a focus. But I felt like I had a safe place to try ideas when rearchitecting because everything’s a module with functions (see earlier point about maintainability).
The solution can start small, and I know that it can be scaled to enterprise scale. I no longer have to decide between a “productive language” or “enterprise language” when starting a project. I know this because it has concurrency out of the box, extremely good tools like mix, an incredible testing culture that’s also easy to test (since it’s all just modules and functions), and the base of a 30yr old language and OTP. And to boot, I can read Elixir just as easy as Ruby and understand the intention of the other developer.
summing up,
not all of these points I make are unique to Elixir-- you can find pattern-matching and immutability and great ecosystems elsewhere, but the magic is that the sum of all these small things build up to a greater language and ecosystem.
Eiji
It’s a really long topic … Everything start long, long ago … no wait … sorry (bad template).
To not make this comment too big I would just list my few hints, so everybody could find himself/herself more and more things:
and anyway you would be able to find even more cons in another ways …
It’s just already too hard to list all things why I and others love this fantastic language!
MalloZup
It comes to my mind: i read elixir code easy.
( one of the advantage comparing to other modern lang).
For large codebases is essential to don t have a barrier how the code is formatted and structured, this doesnt depend always from programmers
Pipelines operators ,etc and similarity to ruby which is one also one the most beautiful readable lang, make elixir just sexy to read ( i dont want to add tne other feat
AstonJ
I’m going to add this talk here too:
codyclay88
I’m using Elixir because it seems to me like a natural fit for the path I was going down as a developer.
Like a lot of us I started out in high school and college being taught Java and OOP. Once I graduated and got into the industry in 2015, the company I worked for was almost entirely .NET, and always with SQL Server.
That combination had worked for most of our projects (admittedly most of them are pretty simple CRUD apps), but being the millennial that I am I had to see what else was out there. Not like I didn’t like C#, I still think it’s a great language and the ecosystem is only getting better with the rise of .NET Core, but I just wanted to experiment.
So for the next year I went around chasing shiny objects and reading opinionated blog posts about why language X is better than language Y, but all the while never actually getting anywhere. I knew that I wanted to build better software, but all I actually got was a bad case of analysis paralysis.
Eventually I came to the conclusion that most languages were just different shaped hammers, all trying to solve a very similar problem in a slightly different way. So I just decided to focus my time on .NET (which my company was happy about) and for a while I was happy.
But then a project came along that was different from the rest, and i saw it as solving a different problem then the ones we had previously solved. So I ventured into the depths again, but this time I tried to stay as close to the .NET pond as possible, and eventually I found Orleans, which is an implementation of the actor model (sort of) developed by Microsoft Research. I had heard of the actor model before, so I decided to dig a little deeper. I went through all the Orleans documentation and tutorials I could find, and then eventually found Akka.NET, and I really liked what I found. Despite that, it felt like these frameworks were simply bolting on the actor model, and I wanted the real thing. So when on vacation this summer, I found an Elixir tutorial by Rob Conery (a seemingly reformed .NET developer turned Ruby and now Elixir), and went through it. And I gotta say, I am having a harder and harder time writing C# with every passing day. Elixir provides an entirely different way of solving problems, and I love that about it. Not only do I like writing Elixir code, but I actually feel like I am learning new skills instead of just learning another new syntax.
Elixir feels like the natural next step in my “Programming Progression”, and I’m really enjoying it. Keep up the great work!