Adding the ?. null verification

Dmitry Olshansky via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 18 12:51:01 PDT 2014


18-Jun-2014 23:36, H. S. Teoh via Digitalmars-d пишет:
>
> Here's a first stab at a library solution:

[snip]

> The only wart I can see currently is the "Maybe(null)" appearing in the
> writeln output, instead of just "null", but that can be worked around by
> implementing a toString method in the Maybe struct that forwards to the
> wrapped type's toString method (or something along those lines).
>
> Anyway, this is just a first shot at it. You can probably build
> something more sophisticated out of it. :)
>

And most importantly make a pull request!


-- 
Dmitry Olshansky


More information about the Digitalmars-d mailing list