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

Peter Alexander peter.alexander.au at gmail.com
Thu Jan 16 18:09:54 PST 2014


On Friday, 17 January 2014 at 02:07:08 UTC, deadalnix wrote:
> Most object don't have a sensible init value. That is just 
> hiding
> the problem under the carpet.

That's true.

class Widget
{
     Widget parent;
     static Widget init = ???
}

How do you define init?


More information about the Digitalmars-d mailing list