Non-null objects, the Null Object pattern, and T.init
Walter Bright
newshound2 at digitalmars.com
Fri Jan 17 11:43:59 PST 2014
On 1/17/2014 6:06 AM, "Ola Fosheim Grøstad"
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Friday, 17 January 2014 at 01:42:38 UTC, Andrei Alexandrescu wrote:
>> One common idiom to replace null pointer exceptions with milder reproducible
>> errors is the null object pattern, i.e. there is
>
> Usually null failures are hard to track when some function returned a null value
> as an indication of error when the programmer expected an exception.
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.
More information about the Digitalmars-d
mailing list