On Thu, Jun 14, 2012 at 5:32 PM, T.J. Crowder <t...@crowdersoftware.com>wrote:

>
>> Is ||= really worth it? It would not assign if the left side is truthy,
>> but perhaps no one will mind.
>>
>
> Nice-to-have. The fact it doesn't assign if the left side is truthy is the
> only reason for having it, surely?
>

Plus not even evaluating the RHS if the LHS is truthy -- useful if the
default is an expensive calculation.

-- 
John A. Tamplin
Software Engineer (GWT), Google
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to