On 8/19/2012 2:41 PM, Simen Kjaeraas wrote:
Nullable!int a;

int x = a; // Compile-time error: a might be null!

if ( a ) {
    int y = a; // 's fine, we know it's not null.
}

You'd want the int to be the non-nullable type. You can do this with D's type system. Each state would be a different type, with user defined conversions between them.


Reply via email to