Christopher Dicely
3/11/2008 3:30:00 AM
On Mon, Mar 10, 2008 at 7:11 AM, Frantisek Psotka
<frantisek.psotka@matfyz.cz> wrote:
> yes, i can write
>
> a = b || a
>
> but isn't it more complex. imagine that b is nil. then a = a will be
> evaluated?
Then why not just "a = b if b"?
>
> maybe time for feature request? new operator a =|| (a = b if b)
>
> (variable = params[:nice_symbol] if params[:nice_symbol] doesnt look
> very nice)
Doesn't bother me, its a lot more clear than variable =|| params[:nice_symbol].
More operators that look similar and have similar but subtly different meanings
is less immediate visual clarity.