We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F# treats exception handling as a specialized case of pattern matching:
F# - try:
try expression with | pattern -> expression | pattern -> expression
F# - match:
match expression with | pattern -> expression | pattern -> expression
On the surface it seems like a good idea and made me question whether this was really a good moment to add exception filtering to C# syntax.
C# - try:
try { … } catch (MyException e) when (myfilter(e)) { … }
C# - match: ? What options do we have now:
try-catch
switch
PS: a bit trollish, but has a point - http://tomasp.net/blog/2015/csharp-pattern-matching/index.html
The text was updated successfully, but these errors were encountered:
Love that link.
Sorry, something went wrong.
Closing. We cannot change existing syntax.
No branches or pull requests
F# treats exception handling as a specialized case of pattern matching:
F# - try:
F# - match:
On the surface it seems like a good idea and made me question whether this was really a good moment to add exception filtering to C# syntax.
C# - try:
C# - match: ? What options do we have now:
try-catch
andswitch
diverge in terms of syntax?try-catch
as well?PS: a bit trollish, but has a point - http://tomasp.net/blog/2015/csharp-pattern-matching/index.html
The text was updated successfully, but these errors were encountered: