jonwagner/Insight.Database

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

Opened this issue · 1 comments

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.

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. :)