Non-null objects, the Null Object pattern, and T.init

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Fri Jan 17 12:35:58 PST 2014


On Friday, 17 January 2014 at 19:43:58 UTC, Walter Bright wrote:
> I've almost never had a problem tracking down the cause of a 
> null pointer. Usually just a few minutes with a debugger and 
> getting a backtrace.

Doesn't work if the unexpected "null" sits in a graph and the 
source of it is hard to pinpoint or occurs "randomly". E.g. if 
you are using a "black box" framework or it happens spuriously on 
a server because it is triggered by a database timeout which 
never happens on the dev server.


More information about the Digitalmars-d mailing list