When will people learn to use programming languages that do not overload types? Null is not an Integer, it is not an address. It is an extra hacked on value. The actual type that should be used Maybe Integer (to use Haskell types). If you use that then you're forced to deal with the possibility of the failure up-front, thus such problems go away.
I recommend Tim Sweeney's slides for an interesting perspective on these problems.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds