[Issue 9636] null initialization for std.typecons.Nullable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 20 13:01:07 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9636
--- Comment #3 from bearophile_hugs at eml.cc 2013-08-20 13:01:04 PDT ---
(In reply to comment #2)
> Arguably, you won't see that very often, but it is plausible for someone to
> want to be able to have a nullable pointer, whose "non-null" value can itself
> be null.
Hopefully I'll not see such code :-)
> As a workaround, Nullable-specific "null-token" could work? EG: something along
> the lines of:
>
> EG:
> enum Nullable {Null}
>
> void foo(Nullable!(immutable int[4]) items = Nullable.Null)
> {}
This seems acceptable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list