Low-Lock Singletons In D

Max Samukha maxsamukha at gmail.com
Fri May 24 06:49:13 PDT 2013


On Friday, 24 May 2013 at 13:05:36 UTC, bearophile wrote:
> Max Samukha:
>
>> Note that the Nullable is not phobos Nullable -
>> the latter incurs unnecessary overhead for types that are 
>> already nullable.
>
> In Bugzilla I have suggested some improvements for Nullable, 
> but in Phobos there is already an alternative Nullable that 
> avoids that overhead:
>
> struct Nullable(T, T nullValue);
>
> Bye,
> bearophile

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?


More information about the Digitalmars-d mailing list