I'm using Elixir's pattern matching also in function definitions, to do without ifs and switches. A trivial example with Elixir syntax (hopefully correct).
def div(a, 0), do: {:error, "can't divide by 0"}
def div(a, 1), do: {:ok, a}
def div(0, b), do: {:ok, 0}
def div(a, b), do: {:ok, a/b}
I'd like to have a pattern matching like that in Ruby as well. A more real world example: def something(%{"a" => %{"b" => b, "c" => c}}), do {:ok, b + c}
def something(_), do {:error, "a didn't contain b and c"}
Much more readable than having to write ifs inside the function/method.All considered, I find Ruby a more pleasant language than Elixir because of syntax, verbosity, state keeping (probably unfair, because OO is made for that vs GenServers), deployment story. I'd like to keep using it for applications that can scale by adding processes, but pattern matching is a killer feature.
Pipelines are important in Elixir because it's functional. It would be a pain to code without them. Object oriented languages can somewhat pipeline by calling methods on results of previous methods, provided a consistent design of classes (each.map.uniq.sort). It seems that in Ruby it could remove lots of useless variables. A lot less head scratching to find sensible variable names, faster programming. I hope it gets into the language or that this gem gets popular.