News for hackers. Stuff that matters.
Re:What’s New in C# 7.0 by sergiotapia on Thursday August 25, 2016 @12:22AM (#12356962)
I thought pattern matching in C# would look like pattern matching in Elixir. For example, two functions with different signatures run based on the parameters you give it.

    def hello("sergio") do
      IO.puts "Hello Sergio"
    end

    def hello(name) do
      IO.puts "Hello #{name}"
    end

    ---

    hello("sergio") => "Hello Sergio"
    hello("mia") => "Hello mia"
Re:What’s New in C# 7.0 by daxfohl on Thursday August 25, 2016 @12:28AM (#12356978)
Isn't that more an example of `multiple dispatch` rather than `pattern matching`?
Re:What’s New in C# 7.0 by muhmi on Thursday August 25, 2016 @01:29AM (#12357107)
Both :) You can pattern match in function head (definition)

http://elixir-lang.org/getting-started/pattern-matching.html

Re:What’s New in C# 7.0 by sergiotapia on Thursday August 25, 2016 @12:42AM (#12357005)
In Elixir land it's been taught to me as pattern matching. I have never heard of `multiple dispatch`.