Trying out Elixir

I've become excited about Elixir and would like to move Common Curriculum to it by this time next year. Together, Elixir and the Phoenix web framework, help alleviate a number of problems I've had with building a real time web app in Ruby. Here are a few of the things that stand out to me:

  • Concurrency Because Elixir is built on Erlang and because Erlang is built around processes, concurrency is neither an afterthought (as it is Ruby) or a mess of callbacks/promises as it is in Node.

  • Immutable data structure I've increasingly found immutable data structures to simplify code and eliminate entire classes of bugs. I prefer them whenever possible.

  • Pattern matching Brian Cardarella has a great post on pattern matching. Check it out. I find pattern matching brings a dramatic reduction in conditionals. It allows code to be written far more declaratively.

  • Phoenix Not only does Chris McCord have a great vision for Phoenix, he's done a great job executing it. Phoenix comes from the convention over configuration philosophy of Rails but embraces the erlang process model to provide channels (over web sockets or long polling) as a first class citizen of the framework. Even more impressive, Chris is building support for dropped messages which is essential. I've always been puzzled that, sock.js, and Pusher don't seem to handle flaky connections by guaranteeing message delivery.

I'm excited to explore it!

Scott Messinger

Read more posts by this author.