|
|
|
|
|
by persnickety
504 days ago
|
|
RPN is definitely easier to implement. I helped someone do that as a student project and while it was minimally complex, there were no edge cases with the operators. You pay for that by having a stack rather than a small fixed number of variables. |
|
you can easily add variables to your rpn calculator. For example ">x" pops the top of the stack into the variable x, and "<x" pushes the value of x to the stack.
You can also interpret parentheses as whitespace to enable users to group parts of the computation (but this may become confusing when they write nonsensical parentheses).