On Monday, 27 August 2018 at 13:02:28 UTC, rikki cattermole wrote:
So Nullable in D and C# is basically the same except C#'s has language support.

The big difference is that in there I could do:

   int? i = null;
   string j = null;
   var k = null;

and test all like:

    i == null;
    j == null;
    k == null;

but in D:

    Nullable!int i;
    auto j = null;
    string k = null;

writefln("%s", i.isNull); // I need to invoke Nullable property isNull;
    writefln("%s", i == null); // I can't just do this.

    writefln("%s", j == null);
    writefln("%s", k == null);

Reply via email to