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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jan 16 18:15:05 PST 2014


On 1/16/14 6:13 PM, Peter Alexander wrote:
> However, I'm not sure this is good. Those kinds of reference cycles can
> easily lead to infinite loops. Is that really an improvement on a
> null-pointer dereference?

You don't have to use the null object pattern for all classes. It's opt-in.

Andrei



More information about the Digitalmars-d mailing list