|
|
|
|
|
by moogly
2328 days ago
|
|
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. |
|
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).
[0]: https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
[1]: https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...