News for hackers. Stuff that matters.
Re:The Logical Disaster of Null by AstralStorm on Thursday May 10, 2018 @01:49AM (#17036671)
Yes, C++ can have nonnullable smart pointers just fine if that is what you want. They will lose reset call, throw on assigning null T*, static assert on nullptr_t, require full initialization on construction, have maximum exception safety.

This could've been done since 2003 but wasn't. There are attempts to bring it into language as part of C++ Core Guidelines project.

This is possible because unlike Java and C# not everything can be null.

There are no comments on this comment yet.