Remus

Jacob Carlborg doob at me.com
Tue Oct 9 23:42:51 PDT 2012


On 2012-10-09 21:10, Namespace wrote:

> My next version will contain the elvis operator:
> [code]
> Foo obj = otherObj.get() ?: null;
> if otherObj.get() is _not_ null, it will assign to obj, otherwise obj
> will be assigned with null.
> [/code]

Will it support this syntax:

Foo obj;
obj ?= otherObj.get();

Will only assign to "obj" if it's null.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list