C and C++ could have non_nullable pointers, easily
C and C++ could have non_nullable pointers, easily
Posted Aug 21, 2009 8:05 UTC (Fri) by njs (subscriber, #40338)In reply to: C and C++ could have non_nullable pointers, easily by nix
Parent article: Null pointers, one month later
Well, xmalloc has all those effects, but that's the *point* of xmalloc, so I don't see what it has to do type-distinguishing nullable and non-nullable pointers... the point of which is to force people to think about whether a pointer can be null every time they want to dereference it, in a relatively painless way.
(This is all relatively common in languages with real type systems.)
