Smart pointers instead of GC?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Feb 2 13:19:59 PST 2014
On 2/2/14, 12:07 PM, Walter Bright wrote:
> On 2/2/2014 9:55 AM, Timon Gehr wrote:
>> - how to eg. create an array of nullable references? struct Nullable!T{
>> @nullable T t; alias t this; } Nullable!T[] foo; ? I think that would
>> cause
>> problems with IFTI.
>
> @nullable being a storage class, this couldn't be done with @nullable
> just as you cannot create an array of 'ref' types.
I don't see how this restriction would work. On the face of it it turns
one cannot create an array of Objects that may or may not be null, which
is a very odd restriction. Such arrays occur in a lot of places.
Andrei
More information about the Digitalmars-d
mailing list