Explicit non-nullable reference types #9604
Unanswered
forgotten-aquilon
asked this question in
Language Ideas
Replies: 1 comment 1 reply
-
This was the original design for nullable reference types. The team decided against this approach because the expectation is the vast majority of the type the developer did not intend to accept |
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.
-
I feel like it should have proposed a long time ago, even with the same syntax, but I tried to search and found nothing.
Reasoning
Yes, you can enable warnings as errors, but it can still be overridden by suppression. But in this case it will be not just some kind of annotation, but treated as a separate type, which means it can be part of an API, so you are forced to handle it on your own.
Examples
Beta Was this translation helpful? Give feedback.
All reactions