Adding the ?. null verification

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 24 15:02:45 PDT 2014


On Tuesday, 24 June 2014 at 19:56:14 UTC, H. S. Teoh via 
Digitalmars-d wrote:
> So D code is going to start looking like this now?!
>
> 	if (myobj.elvis.subobj.memb.isAlive.or(false)) {
> 		...
> 	}

What about ifExists?

if (myObj.ifExists.subobj.member.isAlive.or(false))
{
     //...
}


More information about the Digitalmars-d mailing list