Hello! I'm playing with elixir language lately, and I like the pattern matching and guards in functions. I'm sure more proposal about pattern matching have been done. And yes, in groovy switch is very powerful. But I think can be interesting add something similar in groovy, so then groovy is more functional friendly and readable.
Please take a look at this implementation idea, using AST's: https://gist.github.com/chiquitinxx/296ec6cd0cf4d5afe01e6693f14a877b What do you think? not very interesting, maybe other implementation ideas, too much complex, switch wins, ... Thank you for your time. Some links to elixir: http://elixir-lang.org/getting-started/pattern-matching.html http://culttt.com/2016/05/23/multi-clause-functions-pattern-matching-guards-elixir/
