We seem to have hit a limit with CPU architectures. They now rely on more cores to increase computing power rather than speeding up the frequency of a single core. This has an effect on programming as we now have to write code that can run concurrently. The programming community was turning towards something called functional programming.
It promised concurrency and speed with expressive code. The concept was very intriguing to say the least. Looking deeper, I found a few programming languages that seem to have built a following regarding these features. Clojure, Scala, Haskell and F# are some of the big names in the functional programming sphere.
I was first introduced to functional programming through Scala. I had to use it for a project. After going through the Scala course on Coursera by Martin Odesky, I was enamored. Scala has a good type system and was very expressive compared to Java. It sucked me in with its pattern matching prowess.
Recently, I chanced upon a somewhat newer programming language named Elixir.
Elixir is a dynamic, functional language designed for building scalable and maintainable applications.
Elixir leverages the Erlang Virtual Machine, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.
Looking through it’s Getting Started tutorial, I found it surprisingly refreshing. It’s syntax is very similar to Ruby. But don’t be fooled. It’s similarities are only skin deep. The semantics of both languages are actually very different.
Pattern matching, immutable data structures and recursion comes naturally to Elixir. As it runs on the Erlang VM, it has access to all it’s benefits. With OTP, we can do hot code reloading (never shutdown your service on updates) and write highly robust and distributed software that easily runs on multiple nodes.
It is exciting to learn a new programming language again. Especially one that has excellent tooling and documentation.
I’ve completed the Getting Started tutorial on Elixir’s home page and I’m going to work on Études for Elixir next. Coming from Scala, the thinking process is very similar. Recursion with pattern matching and composability of functions are my current favourite features.
There is so much to learn and explore in the Elixir ecosystem. Everything is so young and fresh. I’m probably going to lurk in the #elixir-lang IRC channel a lot in the months to come.
Published on 3 Sep 2014 by Stanley Tan
| Stanley Tan |