Reflection — An Honest Take 8 min

Honest Take — Before You Begin

Honest reflections on a language that looks like Ruby but thinks like nothing else


Dave Thomas wrote Programming Elixir and co-wrote The Pragmatic Programmer. That is not a coincidence and it is not a footnote. The person who literally wrote the book on being a better programmer looked at the landscape of languages and decided Elixir was the one worth writing a definitive guide for. Dave Thomas does not get excited easily. He got excited about Elixir. Pay attention to that signal.

Elixir will seduce you with familiarity. The syntax looks like Ruby. You will see do...end blocks, pipes, modules with functions, and your brain will whisper "I already know this." Your brain is lying. Elixir borrows Ruby's skin but has Erlang's bones. The moment you try to write Ruby-style code in Elixir -- mutating variables, building object hierarchies, relying on shared state -- the language will push back. Not with errors, necessarily. With friction. The idiomatic path is different, and fighting it makes everything harder than it needs to be.

Pattern matching changes everything. This is not hyperbole. Once you internalize pattern matching -- in function heads, in case statements, in assignments -- you will wonder how you ever wrote code without it. It eliminates entire categories of conditional logic. Instead of checking what something is and then deciding what to do, you declare what shape the data should have and the runtime figures out which function to call. It is a completely different relationship between your code and your data. Guards extend this further. You stop writing defensive code and start writing declarative code.

The other revelation is the pipe operator. In Ruby, you chain methods on objects: user.orders.active.total. In Elixir, you pipe data through transformations: user |> get_orders() |> filter_active() |> calculate_total(). Same result, fundamentally different mental model. Data flows through functions instead of objects receiving messages. It sounds like a small distinction. It is not.

Jose Valim was a Rails core team member before he created Elixir. He understood Ruby and Rails deeply -- deeply enough to know what he wanted to keep and what he wanted to leave behind. Elixir is not a rejection of Ruby. It is an answer to the question: what if we kept the developer happiness but built on a foundation designed for concurrency, fault tolerance, and distributed systems?

Conclusion #

Learning Elixir's syntax will take days. Learning to think in Elixir will take months. The syntax familiarity is both a gift and a trap -- it lowers the barrier to entry but creates a false sense of competence. The real work is not learning what Elixir can do. It is learning what Elixir wants you to do. Pattern matching, immutability, and the pipe operator are not features. They are the language telling you how it wants to be used. Listen to it.

Predictions #

  • You will write your first Elixir code in hours and feel confident -- that confidence will be premature but useful for motivation
  • Pattern matching in function heads will be the feature that permanently changes how you think about function design, even in Ruby
  • You will catch yourself trying to reassign variables and feeling annoyed by the constraint before realizing the constraint is the point
  • Dave Thomas's book will make you a better programmer in general, not just a better Elixir programmer
  • Within a month, the pipe operator will make you mildly frustrated every time you go back to Ruby and cannot use it
Learning resources 7

That's the free preview. Sign in to continue this course.

Sign in to continue

New here? Make a desk →