Improve library with nullable reference types
See original GitHub issueNullable reference types (NRTs) were introduced in C# 8 to help developers understand their usage of null
values throughout their code to avoid unexpected exceptions on edge cases or explicitly mark values as nullable if they are intended to be. More information can be found in the official Microsoft docs.
I feel like security critical libraries like this one could really benefit from implementing this feature for the following reasons:
- It would improve the library code itself by ensuring all possible null cases are accounted for (Ex: Adding null checks or making variables nullable).
- This is important because even if the current code is null safe without this feature now, future code may introduce edge cases that aren’t caught. This feature could help prevent that from happening.
- Consumers of the library who also have the feature enabled will get the nullable signatures from this library to keep their code safer as well.
- More info: Microsoft dev blog
I would be very happy to attempt integrating this feature into the code if you support the idea.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Update your codebase to use nullable reference types
Disabling nullable as the default works better if the library is stable, and the main focus of the development is to adopt nullable...
Read more >Nullable Reference types in C# – Best practices
Nullable reference types in libraries. To fully benefit from nullable reference types, it's important that any class libraries referenced by ...
Read more >Benefits of C# 8.0 nullable reference types when working ...
I'm currently in the process of updating an ASP.NET Core 2.1 project to .NET 5 and at the same time trying to take...
Read more >Improved Analysis and Hints for Nullable Reference Types
This opens up an interesting opportunity to improve type hints. As you may already know, implicitly typed variables are now nullable by default, ......
Read more >C# 10.0 improves handling of nullable references in ...
C# 10.0 improves handling of nullable references in generic types - no more AllowNull · The non-generic case · The generic case, before...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
🎉 This issue has been resolved in version 6.6.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
Yup! Thanks for reopening and sorry for the delay on this last one. I’m mostly done with it but life got pretty busy. I should have a PR within the next week though.