[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

%and, %or, and the return value of assignment



Noah wrote me privately, saying

> In older versions of es, %and and %or returned the last value they
> evaluated, rather than a mere true or false value.  The former behavior was
> quite useful and I personally relied on it heavily.

i agree that the new behavior is wrong.  i started looking at how to
rewrite %and and %or (aka, && and ||), and i saw that it would be much
easier to get them right if the assignment operator (=) returned the
value that was assigned rather than what it currently does, which is
always return true.

anyway, i though this change would be a useful generalization.
if i don't hear complaints, this will be changed in the next
release of es.

comments, anyone?

paul