Skip to content

Null check at runtime by default + optional disabling #104677

Answered by julealgon
SylvainGantois asked this question in Q&A
Discussion options

You must be logged in to vote

I'm pretty sure the biggest problem with this is that NRT is optional from the beginning... meaning you can be interacting with a lot of libraries that have it turned off, even if you have it turned on yourself.

This means this kind of runtime check would be unreliable at best.

There are also some scenarios today that don't "respect" NRT annotations, such as some serialization-related flows (i.e. IOptions binding), so the enforcement would not be comprehensive enough.

I think there is a lot more work that needs to happen before making this an automatic runtime check is feasible, but I'd also love to have it.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by SylvainGantois
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
2 participants
Converted from issue

This discussion was converted from issue #104656 on July 10, 2024 14:02.