Checking function parameters in Phobos
Jonathan M Davis
jmdavisProg at gmx.com
Wed Nov 20 11:23:14 PST 2013
On Wednesday, November 20, 2013 19:53:43 Meta wrote:
> Yes. It is very important not to allow direct access to the
> underlying value. This is important for ensuring that it is not
> put in an invalid state. This is a mistake that was made with
> std.typecons.Nullable, making it useless for anything other than
> giving a non-nullable type a null state (which, in fairness, is
> probably all that it was originally intended for).
It's arguably pretty pointless to put a nullable type in
std.typecons.Nullable. If you want a nullable type to be null, just set it to
null.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list