null dereference exception vs. segfault?

bearophile bearophileHUGS at lycos.com
Mon Aug 2 15:32:04 PDT 2010


Pelle:
> I think a good thing would be NonNull!T, but I haven't managed to create 
> one. If this structure exists and becomes good practice to use, maybe we 
> can get the good syntax in D3. In 20 years or so :P

Maybe we are talking about two different things, I was talking about nonnull class references/pointers, you seem to talk about nullable values :-) Both can be useful in D, but they are different things.
Nullable values are simpler to design, they are just wrapper structs that contain a value plus a boolean, plus if you want some syntax sugar to manage them with a shorter syntax.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list