null [re: spec#]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Nov 8 12:59:35 PST 2010


On 11/8/10 1:10 AM, Simen kjaeraas wrote:
> Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
>
>> On 11/7/10 4:21 PM, bearophile wrote:
>>> Andrei Alexandrescu:
>>>
>>>> And what was exactly the claim that was wrong?
>>>
>>> That there is no need of compiler& syntax support to implement "good
>>> enough" nonnullable reference types in D.
>>
>> The only change needed is constructor flow to make sure types with
>> @disable'd constructors are always properly initialized. Array
>> construction can be supported with a library function.
>
> One more thing: structs with NotNull!T fields will need to have their
> default constructor disabled automagically.

That's achievable with the already-existing (but largely inoperant) 
@disable.

Andrei


More information about the Digitalmars-d mailing list