Low-Lock Singletons In D
bearophile
bearophileHUGS at lycos.com
Fri May 24 07:03:22 PDT 2013
Max Samukha:
> The question is what should be the result of:
>
> Nullable(int*)?
> Nullable!(Nullable!T)?
>
> Forbidden (like in C#)? Aliased to the source type? A distinct
> type?
In D Nullable!(int*) needs to be a different type, because the
interface is different between a pointer and a Nullable.
But often you want to use something like Nullable(int*, null) or
Nullable(int*, cast(int*)null) instead.
In the second case maybe it can be collapsed into a single
Nullable, but such behavior needs to be documented.
Bye,
bearophile
More information about the Digitalmars-d
mailing list