3 ms·
For what it's worth, it seems that Rust isn't alone here. C# 8.0 introduced postfix `switch` expressions (https://devblogs.microsoft.com/dotnet/do-more-with-pat
by Twisol 7y ago
For what it's worth, it seems that Rust isn't alone here. C# 8.0 introduced postfix `switch` expressions (https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/ https://devblogs.microsoft.com/dotnet/do-more-with-patterns-...), which are along the same lines of what's suggested for `match` in Rust further along in the OP.
I agree that it looks strange at first. But I think I'll get used to it.
- albru123 7y agoThanks for pointing this out, I had no idea they implemented this for C# 8.0 Also is it just me or the switch pattern really is inspired by Rust match?