On 7/6/10, bearophile <[email protected]> wrote:
> I don't think that's a good idea, you lose the standard API of Nullable, so
> it's worse than useless.
Make that standard API free functions, like std.array does. Then, it
would work with all nullable items, and not just Nullable ones.
Uniformity is good.
>(and don't add a boolean after the T, using the null
> reference to store the missing T).
This would be the next best thing. struct Nullable(T) { T value; alias
value this; mixin standardApi!(this); } could do it.