Null references redux

Walter Bright newshound1 at digitalmars.com
Sat Sep 26 15:10:55 PDT 2009


Jarrett Billingsley wrote:
> It wouldn't. The compiler wouldn't allow it. It would force you to
> initialize it. That is the entire point of nonnull references.

Initialize it to what?

A user-defined default object? What should happen if that default object 
is accessed? Throw an exception? <g>

How would you define an "empty" slot in a data structure?



More information about the Digitalmars-d mailing list