Null references redux
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Sep 26 16:28:33 PDT 2009
Walter Bright wrote:
> The problem with non-nullable references is what do they default to?
> Some "nan" object? When you use a "nan" object, what should it do? Throw
> an exception?
This is the mistake. There would no way to default initialize a non-null
object. I'm surprised you are still saying this, because we discussed
how NonNull!T could be implemented by disabling its default constructor.
Andrei
More information about the Digitalmars-d
mailing list