Transition to using explicit nullable types (#184)#300
Transition to using explicit nullable types (#184)#300artog wants to merge 6 commits intobeardgame:masterfrom
Conversation
…enance and understanding. (beardgame#184)
|
Completed transition for |
|
Hi artog, Great to see you've taken an interest in contributing. The nullability issue is one that would be great to close off finally! I didn't review your PR in detail, since it's still in draft, but the change you made to The My suggestion would be to either revert the |
✨ What's this?
Removes all warnings related to nullable. Also made a more straight-forward implementation of
Maybe<T>🔗 Relationships
Closes #184
🔍 Why do we want this?
Using explicit nullable is a move towards safer and more stable code.
🏗 How is it done?
Mostly went through all errors and fixes as I went along.
Maybe<T>caused a bunch of trouble, so I remade the functionallity using an abstract main class (Maybe<T>) with two deriving classes (Just<T>andNothing<T>). This separates the intent into two different classes, both simplifying the actual logic and prevents any casting/default issues.💥 Breaking changes
Hopefully none. Tests are unchanged (and still full of warnings) to allow for insight into backwards compability.
💡 Review hints
Might be wasier to look at commits rather than full PR, especially for the change to
Maybe<T>