API-break, bitwise operators, evaluation speed
API Break
Previously, the ^
operator stood for "exponent", it now means "bitwise-XOR". The exponent operator is now **
, in line with the Ruby style (since it's the only language which seems to have an operator for that). This will break expressions that worked in 1.x. Before upgrading to the 2.x, check to see if you have any expressions which use the ^
operator, and change them to **
. There is no automatic checking for this, no switching for the semantics. You need to do an audit on your own, or your expressions may not evaluate how you expect.
It is not expected that any similar API breaks will happen in the future, this one was only due to author's oversight early in development. See #20 for some discussion of the change.
Features
- Bitwise operators ( #18 #19 )
- Dramatically improved evaluation speed at the slight cost of more memory usage and slightly slower parse times. This change is net-neutral in speed if an expression is only evaluated once, but if a parsed
EvaluableExpression
is ever re-used, the gains will be apparent.
Bugs
- Fixed case where multiple consecutive operators of equal precedence would evaluate in backwards order ( #21 ).