Sure, I think calc and calculator are more full-focused calculators that
require a learning-curve, this plugin is more of an quick ad-hoc calculator
that calculates values like (infix notation)
[...]
Thanks, but I meant to add that to the README or the `Commentary:`.
Also I was thinking more about the documentation on which operations are
supported. [ IIUC you only support the four basic arithmetic
operations, with standard precedence rules, plus parentheses for
grouping, right? ]
Also, I was wondering if you had considered implementing the parser with
the following approach:
- read the line with (read-from-string (concat "(" STRING ")"))
- massage the resulting sexp to implement the desired infix syntax.
You could even do the massaging via a macro, where
(infix 2 + 3 * 5)
(infix 2 + (3 * 5))
(infix (2 + ((3) * 5)))
all macroexpand to
(+ 2 (* 3 5))
so your syntax could be used inside code as well.
Stefan