Replies: 7 comments
-
But there's only two points listed. 🤔 |
Beta Was this translation helpful? Give feedback.
-
As I said before, I am not a fan of using |
Beta Was this translation helpful? Give feedback.
-
The entire point of adding
|
Beta Was this translation helpful? Give feedback.
-
We are already familiar with using |
Beta Was this translation helpful? Give feedback.
-
Parenthesis are for establishing order of operation, not disambiguation. And parenthetical patterns are also proposed. Patterns behave differently from operators, trying to combine their syntax, even without the ambiguity, would only be confusing. |
Beta Was this translation helpful? Give feedback.
-
I really don't like the idea that these two would behave differently due to parentheses: if (obj is bool && false) // always false
if (obj is (bool && false)) // true if obj is false I'm 100% with @HaloFour here, the following looks like a pattern rather than a logical expression and so makes it clear how the if (obj is bool and false) |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if this has been suggested already, but for the binary operators issue, can't we do something like this? object o = (short)1;
_ = o switch
{
int x < 3 => 0,
_ == 1 => 0xC0FFEE,
_ => 0xDEADBEEF
} That way we're explicitly including the type ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-11-18.md
Agenda: discussion of more pattern-matching features
Beta Was this translation helpful? Give feedback.
All reactions