From the features they are porting into the language I think this is the case; albeit C# will always be the more verbose language and the features will feel somewhat clunky at times IMO. Pattern matching, async yield return, async/await, etc all were in F# in some form beforehand with features like records and DU's probably being investigated as well. When I read a new C# language version announcement it does feel like I'm reading a subset of the F# feature list.
I used Scala for a bit and then came back to C# and felt like they were porting over all the Scala features, but I think the F# explanation may make more sense.
Well C# 7.2 and 7.3 was moving it more to Rust. So that F# statement is a bit limited. They steal best ideas from everywhere and integrate it into the multi-paradigm language C# actually is.
In 2020 Pattern Matching is just a elementary feature everyone wants to have in all general purpose language. Like async/await. Or LINQ. That is just 101 for languages from now on.
There are also linters [0] available for checking that your cases are exhaustive, which can even be configured to emit the lack of exhaustive checking as an error, rather than just a message or warning.
Is `match` a reserved word in C#? I don't use it that much, but have used scala and F# pattern matching and they all use the term `match`, which seems more intuitive.
It's not reserved (and that's probably why it's not used). Most teams working on languages with a decently long history are very reluctant to add new keywords, because it will break preexisting code.
`match` is a very common variable name, not only in relation to regexes.
There are of course ways to do contextual parsing so that you can introduce new keywords (I believe this was done in C# with the LINQ extensions), but it complicates things for all eternity, so you want to avoid it.
C# isn't too hesitant to introduce new keywords because it supports contextual keywords.[0] Many C# keywords are also valid identifiers. In this case, using `match` in place of `where` probably wouldn't have introduced any incompatibilities.
In fact, `where` isn't a reserved keyword, either--you can have an identifier named `where`.[1]
To an existing C# programmer, `where` makes a lot of sense, since it's used for matching elsewhere (e.g., LINQ).
C# has never added new reserved keywords. All keywords added after 1.0 are contextual and can still be used as identifiers. With some things like nameof, they even get their special meaning only if there's nothing else of that name that could be called. They take backwards compatibility of existing code quite serious. In fact, the only instance I can remember where C# had a breaking change was in C# 5 with how the foreach loop variable interacted with closures. The probability of code existing that relied on the old behaviour is probably really low, though.
There have been breaking API changes--.NET Core and the upcoming .NET 5 being good examples--but they're generally handled well. I can't recall any major breaking language changes, though.
They don't let backwards compatibility keep them from introducing new features and syntaxes, which is quite nice. Most languages that want to avoid breaking backwards compatibility seem too hesitant to introduce new language features.
"where" is for match guards. Do you mean use "match" instead of "switch"? Given that the statement construct is already called "switch", it makes sense that the expression form doesn't try to use a different keyword for what is largely the same thing.