Re:Catching use-after-move C++ bugs with Clang's consumed an...
by damnyou on Thursday July 11, 2019 @12:09AM
(#20409047)
You still have to deal with both the #1 and #2 worst ideas in computer science — nullability and inheritance.
[ Parent
| on HN ]
Re:Catching use-after-move C++ bugs with Clang's consumed an...
by Const-me on Thursday July 11, 2019 @12:26AM
(#20409125)
You 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.