C# Non-Nullable Types: Backwards Compatibility
In previous episodes I proposed a set of requirements for non-nullable reference types in C#/.NET, and a proposed design, including their interaction with generic types (polymorphic types).
There is also something to be said about backwards- and forwards- compatibility:
- How can legacy code — using implicitly-nullable reference types — be migrated to using non-nullable references without causing disruption?
- How should legacy code interact with APIs which accept or return non-nullable reference types?
- What are the implications of generic code to backwards compatibility?