Comparison operator chaining #6899
Unanswered
The-Futurist
asked this question in
Q&A
Replies: 2 comments 1 reply
-
See: #4108 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, as this points out:
Existing legitimate use of this might be either nil or very very rare. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was recently looking at this capability for a new language after reading about Raku (which does have a lot of operarotors). In Raku we can write:
Which is logically equivalent to:
So I wondered if C# could benefit from adopting this. At first glance this seems like it might well be a non-breaking change because the scenarios under which it will compile today seem to be few if any (unless the operators have been overloaded perhaps...).
Given also that C# does accept this syntax (though this is nothing to do with comparison of course)
then this does not seem that unreasonable.
This has some overlap with: #217
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions