How does D handle null pointers?
bearophileHUGS at lycos.com
Mon Aug 23 14:09:32 PDT 2010
> char foo()
> if (some condition)
> return "yada";
> return null; //compiler makes note that foo() might return null
> void bar()
> char s = foo();
> printf(s); //compiler issues warning because 's' has not been
Your example is not particularly well chosen, D arrays are not really references, they are fat, two words long.
More information about the Digitalmars-d