(non)nullable types

Brian digitalmars at brianguertin.com
Wed Feb 11 22:42:04 PST 2009


On Thu, 12 Feb 2009 05:53:10 +0100, Don wrote:
> Thus, trigger a run-time assert does not help AT ALL. Only a
> compile-time check will do.

i couldnt agree more. i think this would be a great addition to D.
if the syntax for dealing with nullables is kept simple, i dont see any 
downside.

Foo? f = getFoo();
f.doStuff(); // shouldnt compile
if (f) f.doSomething(); // automatically usable



More information about the Digitalmars-d mailing list