4 ms·
I was originally very happy to hear pattern matching was coming to C#, but I don't think it is actually that useful a feature without discriminated unions/sum t
by tybit 9y ago
I was originally very happy to hear pattern matching was coming to C#, but I don't think it is actually that useful a feature without discriminated unions/sum types too.
- platz 9y agoWhat C# has now is better described as fancy form of Destructuring . Perhaps they'll add actual pattern matching in a later release. Actually the proposed java version is better than C#'s because it allows a form of exhaustiveness checking which C# doesn't even attempt to provide for. However they had to add the `sealed` keyword too, which does not currently exist in java