Adding the ?. null verification

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 19 06:15:47 PDT 2014


On 2014-06-19 7:31 AM, Nick Treleaven wrote:
> Perhaps Maybe could implement opCast!bool, then we could do:
>
> if (auto v = ...)

That would be amazing, but maybe is used in haskell for a different 
purpose, so failsafe could be a more appropriate name I think:


if (auto k = tree.failsafe.left && auto v = 
tree.failsafe.right.leftArr.front.rightMap[k].left)
{
	...
}

Would be great


More information about the Digitalmars-d mailing list