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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jan 16 18:06:02 PST 2014


On 1/16/14 5:57 PM, Rikki Cattermole wrote:
> I am assuming init will be a property static function.

In the example above it's just a static data member.

> So essentially we
> would be removing .init support for classes in compiler and pushing it
> out into Object.
>
> I would rather if that is an option an init static function, that it
> would be required to have override otherwise it would be too 'magical'
> for me atleast.
> The default can still be null.

Override only works for nonstatic methods.


Andrei


More information about the Digitalmars-d mailing list