4 ms·
It is new to C#, which is slowly catching up to Scala and F# in that regards. Mads Torgesen is good friends with Martin Odersky, in fact, when I first met Mads
by seanmcdirmid 9y ago
It is new to C#, which is slowly catching up to Scala and F# in that regards. Mads Torgesen is good friends with Martin Odersky, in fact, when I first met Mads back in 2006 or so, they were talking about adding pattern matching to C#. C# is a much more conservative language, and it makes sense it would take a while to add.
There are good reasons to use C#, so when it gets a new feature that other languages have had for years, well, it is newsworthy.
Now when will javascript get pattern matching?
- dvlsg 9y agoThere's a proposal for it! Stage 0? Stage 1? Don't remember what stage it's in off the top of my head, but it looks promising.
- herrschnapps 9y agoIt's just become a Stage 0 proposal: https://github.com/tc39/proposal-pattern-matching https://github.com/tc39/proposal-pattern-matching
- seanmcdirmid 9y agoWoo hoo, can't wait. Especially with what TypeScript can do with this.
- _old_dude_ 9y agoThere is a paper, Pizza into Java: Translating theory into practice, from Odersky and Wadler at POPL 97 about how to mix generics, lambda and pattern matching in a Java like language. C# and Java are slowly catching up :)