Is the other-kind-of-null really necessary in Nullable and Variant?
deadalnix
deadalnix at gmail.com
Mon Apr 29 05:23:03 PDT 2013
On Sunday, 28 April 2013 at 16:33:19 UTC, Idan Arye wrote:
> When you use `std.typecons.Nullable` with a type that already
> accept `null` values, you get two types of nulls - the
> `Nullable`'s null state the the regular type's `null`:
>
> Nullable!string a;
> writeln(a.isNull()); //prints "true"
> a = null;
> writeln(a.isNull()); //prints "false"
> a.nullify();
> writeln(a.isNull()); //prints "true"
>
All types should be non nullable. Problem solved.
More information about the Digitalmars-d
mailing list