[nem-en] Operator ??

Igor Tkachev it at rsdn.ru
Mon Oct 2 14:39:02 CEST 2006


Hello Ivan,

> Hmm, I'm not sure will ??= operator usefull,

I'm sure you are not :))

For example, property lazy initialization with non default value.

> but it's quite simple to implement when we have ?? operator:

>   macro @??= (exprA, exprB)
>   {
>     <[ {$exprA = $exprA ?? $exprB; $exprA} ]>
>   }

> Let's JIT removes unnecessary assignment: a = a

Now I'm not sure it will.

-- 
Best regards,
 Igor                            mailto:it at rsdn.ru





More information about the devel-en mailing list