On 2010-07-06 17.01, Adam Ruppe wrote:
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.
Uniform function call syntax isn't implemented (issue 3382), if you're
referring to that.
(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.
--
Jacob Carlborg