Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nullable reference types and update public api's as appropriate #518

Open
lawrencek76 opened this issue Jul 24, 2024 · 1 comment

Comments

@lawrencek76
Copy link
Collaborator

Public api's at a minimum should report the correct nullability of returned reference types and parameters.

Benefits of adding nullability include:

  • Improved Code Quality and Safety:
    • Nullability annotations help to catch potential null reference exceptions at compile time rather than at runtime. This leads to more robust and reliable code.
    • Modern development environments like Visual Studio provide extensive support for nullability annotations, including warnings and suggestions, which can further improve the codebase quality.
  • Enhanced Developer Experience:
    • These annotations provide clear documentation about which variables can be null and which cannot, making the code easier to understand and use for other developers. This is especially important in open-source projects where contributors may not be familiar with the entire codebase.
  • Better Interoperability:
    • With nullability annotations, different components of a project can interact more safely. External libraries and APIs that also use nullability annotations will integrate better.
    • As more of the .NET ecosystem adopts nullable reference types, aligning with this standard can make it more attractive to contributors and users who expect modern code practices.
@jonwagner
Copy link
Owner

Oh good you self-assigned this. It's a great time to add that but I don't know if I can find the time. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants