New kind of logical operators ( !, &&, ||). #4688
Answered
by
HaloFour
IgorSivirinov
asked this question in
Language Ideas
-
SummaryAdd a new kind of logical operators.
if ((x > y and x < z) or not(y >= v or y >= w))
{
Console.WriteLine($"Sum: {x + y}");
} Motivation
|
Beta Was this translation helpful? Give feedback.
Answered by
HaloFour
Apr 24, 2021
Replies: 2 comments
-
These are specifically not expression operators to prevent ambiguity between patterns and expressions. This would break that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
IgorSivirinov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
and
,or
andnot
keywords have already been adopted for use with patterns and cannot be repurposed for aliases of the existing boolean operators without introducing ambiguities.