All "real" functional languages support Pattern Matching - that's not really true, but it is correct that aspects of a functional programming style benefit from elegant and syntactically compact case distinction. Microsoft worked on Pattern Matching as a C# feature in at least three major language versions! In this talk, Oliver demonstrates how C# Pattern Matching works, why this evolution of the old imperative "switch" is so important, and how the structure of C# Code can be generally different from the past on the basis of this feature. As a conclusion, he proves that C# can now pattern match with the best, by porting a complex piece of Haskell code.
Connect with .NET:
Blog: https://aka.ms/dotnet/blog
Twitter: https://aka.ms/dotnet/twitter
TikTok: https://aka.ms/dotnet/tiktok
Mastodon: https://aka.ms/dotnet/mastodon
LinkedIn: https://aka.ms/dotnet/linkedin
Facebook: https://aka.ms/dotnet/facebook
Docs: https://learn.microsoft.com/dotnet
Forums: https://aka.ms/dotnet/forums
🙋♀️Q&A: https://aka.ms/dotnet-qa
👨🎓Microsoft Learn: https://aka.ms/learndotnet
#dotnet