3 ms·
You still have to deal with both the #1 and #2 worst ideas in computer science — nullability and inheritance.
by damnyou 7y ago
You still have to deal with both the #1 and #2 worst ideas in computer science — nullability and inheritance.
- Const-me 7y agoYou don't have to. C# has value types incl. user ones, they are not nullable. If you don't like inheritance, don't use it. I sometimes write pages of code without any non-static class. When doing OO, if you want polymorphism but don't want inheritance, use interfaces. They are not base classes, you can implement many, or implement on a value type.