Microsoft has started preparing for the launch of the version 8 of its C# language. This new version will be mainly targeted to improved the quality of the code to make software developments more flexible in a long run.
The first change that Microsoft has planned for the new C# version is the addition of nullable reference types to improve code quality. The new update will rename the existing reference types as non-nullable. Also, C# compiler will warn developers when nullable types are unreferenced and when the values are assigned to non-nullable variables. The feature is added to help developers prevent from using null reference exceptions.
Alongside the built-in feature to improve code quality, the compilers for C# are designed to recognise when something is not null. The native compiler will also include the capability to help developers detect and fix bugs that are not null in the code. Script breaking behavior is also planned to be fixed using opt-in means.
Default interfaces with programming support
Microsoft has developed new default interfaces with programming capability to help developers in evolving interfaces using virtual extension methods. There is a provision to let API author add methods to an interface without breaking source or binary compatibility. Additionally, Microsoft has added an async streams feature to offer an abstraction of an asynchronous version of IEnumberable. This will help developers enumerate the nongeneric collections.
C# 8 will offer an extension for almost all the components. While you can define methods of extended types in the existing C# version, the new features will extend the support for static and instance members. Microsoft is yet to declare the release date of the new version.