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

Rikki Cattermole alphaglosined at gmail.com
Thu Jan 16 18:15:05 PST 2014


On Friday, 17 January 2014 at 02:06:03 UTC, Andrei Alexandrescu 
wrote:
>> 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.

I know it doesn't. Its more for making it nicer to read than 
anything.
An actual property as you've shown would be nice. But having 
another place which can be abused, which you can write code for 
is nice.


More information about the Digitalmars-d mailing list