Python.. Ruby.. Now Elixir? - Hipsters Assemble

Python.. Ruby.. Now Elixir? - Hipsters Assemble

The thoughts of a bad programmer on moving from a ruby and python background to Elixir

Presented to the KatsConf conference on the 16th September 2016

1f3d30c33ce0b2f5bf9925d7dc3452e1?s=128

Stephen McCullough

September 17, 2016
Tweet

Transcript

  1. Python… Ruby… Now Elixir? Hipsters Assemble

  2. About Me • Stephen McCullough • Currently working at ShopKeep

    as Senior Software Engineer • On a daily basis I use python & ruby • Find me at swm.cc or @swmcc on various interwebs
  3. Hipsters Assemble… Is this harsh?

  4. So why Elixir? • The future is functional • The

    future is concurrent
  5. Immutability and functional • Elixir is a functional language with

    immutability • Mutability brings an uncertainty about how a program will execute • Functional programming and immutability makes it easier to reason about code
  6. Concurrency • Its here to stay • Concurrency in Elixir

    is easy.
  7. Web Framework • Phoenix is the most popular web framework

    (for now) • Creator of Elixir is a Rails core member and the creator of Phoenix • Opens up possibilities that are not present in traditional web frameworks
  8. So why Elixir again? • In my head it isn’t

    that big a step from python/ ruby to elixir • Community is great
  9. hello.erl • ruby like syntax • I’ve found that elixir

    takes a lot of things from ruby
  10. hello.erl • In Elixir 'def' is a function call •

    In Elixir ‘if’ is a function call too
  11. Meta Programming! • Elixir embraces metaprogramming • To me this

    was scary and not at all native to my thinking. • Elixir is Macros, mostly
  12. Elixir is Macros • …. mostly • Elixir uses macros

    to provide interfaces for expanding complex sets of instructions during compilation
  13. Pattern Matching • In Elixir, the = sign doesn’t necessarily

    mean “set this variable equal to something else” • The realisation that it behaves differently based on the types involved
  14. List Comprehensions • I <3 list comprehensions. Ruby doesn’t have

    them but python does. • I have found that Elixir often has better functions (such as those from List and Enum) which are more flexible.
  15. Higher-Order Functions • Passing functions as arguments - it can

    be done in ruby and python. • Native and natural part of the language rather than an oddity.
  16. I’m at the start • I am slowly learning Elixir

    • I have found it “exciting” • It takes a while to get into the headspace • Functional yet practical
  17. What I want to learn next • Protocols • Sigils

    • Recursion
  18. None