Adding the ?. null verification

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 25 01:01:29 PDT 2014


On 2014-06-24 22:52, Ary Borenszweig wrote:

> And in Ruby it's just "||=". How more intuitive can it get?
>
> a = nil
> a ||= 1
>
> The "or" that you are discussing here is just an "||" in Ruby:
>
> b = nil || 1

Yeah, but that behaves a bit different in D.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list