User: Password:
|
|
Subscribe / Log in / New account

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 (guest, #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.)


(Log in to post comments)


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds