just an idea (!! operator)

Jacob Carlborg doob at me.com
Thu Jul 12 05:51:36 PDT 2012


On 2012-07-12 13:35, Jonas Drewsen wrote:

> Or the operator?? could be borrowed from c#
>
> auto a = foo ?? new Foo();
>
> is short for:
>
> auto a = foo is null ? new Foo() : foo;
>
> /Jonas
>

I really like that operator. The existential operator, also known as the 
Elvis operator :) . It's available in many languages with slightly 
different semantics.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list