[nem-en] Operator ??
Ivan A Eryshov
ivan.eryshov at gmail.com
Mon Oct 2 13:40:28 CEST 2006
On 30/09/06, Igor Tkachev <it at rsdn.ru> wrote:
> I have another exercise for macro-writers :)
> What about '??='
>
> It should implement the following pattern:
....
> What do you think?
Hmm, I'm not sure will ??= operator usefull, 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
--
Best Regards,
Ivan A Eryshov.
-= RSDN forever! =-
More information about the devel-en
mailing list