News for hackers. Stuff that matters.
Re:UI is hell: four-function calculators by enriquto on Friday January 24, 2025 @04:01AM (#42811602)
> 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).

Re:UI is hell: four-function calculators by ropejumper on Friday January 24, 2025 @04:23AM (#42811675)
They meant that the implementation of a four-function calculator only needs a few fixed variables rather than a stack.