likebike / fasteval

Fast and safe evaluation of algebraic expressions
https://crates.io/crates/fasteval/
MIT License
267 stars 26 forks source link

Allow calling nullary functions without empty parentheses #22

Open dvtomas opened 1 year ago

dvtomas commented 1 year ago

Now:

2 * pi()

Desired:

2 * pi

Is there any reason for the first? Would it make sense/be easy to implement the second? The second is what I see and prefer with most other evaluators, and forcing the first is actually a big blocker for our customers (other than that fasteval looks great to me). The first form could still be available to maintain backwards compatibility.

Thank you.