just an idea (!! operator)

Jacob Carlborg doob at me.com
Thu Jul 12 11:36:44 PDT 2012


On 2012-07-12 18:24, Daniel Murphy wrote:

> Yeah, I've been planning to try and get this into D one day.  Probably
> something like:
> (a ?: b) -> (auto __tmp = a, __tmp ? __tmp : b)

We need to combine it with the assignment operator as well:

Object foo;
foo ?:= new Object; // only assign if "foo" is null

-- 
/Jacob Carlborg




More information about the Digitalmars-d mailing list