Safe Navigation Operator “?.” for D2 ?

deadalnix deadalnix at gmail.com
Thu Feb 27 14:14:47 PST 2014


On Thursday, 27 February 2014 at 21:49:20 UTC, Steven 
Schveighoffer wrote:
> On Thu, 27 Feb 2014 16:45:11 -0500, Steven Schveighoffer 
> <schveiguy at yahoo.com> wrote:
>
>> ifnull(parent).child.child.child
>
> brain fart...
>
> ifvalid(parent).child.child.child
>
> -Steve

What you want is a maybe monad, and we can do that with D 
metaprogramming capabilities already.


More information about the Digitalmars-d mailing list