Archive for December, 2013

RPN Calc Part 5 – Eliminating the Globals

Posted Dec 17 2013 by with 0 Comments

Throughout the last four parts of this series, the common theme has been that the state of the calculator program has been managed globally. This requires the main command loop to directly update global data after each command, to prepare the state for the next command. While this works, it would be nice to remove the need for the global update. This post talks about how that’s done in the functional version of rpncalc.

Continue Reading…

RPN Calc Part 4 – A Noun for State

Posted Dec 10 2013 by with 0 Comments

In the last installment of this series, I built a basic undo facility on top of the command pattern. One of the problems with that implementation is that the Command class has to know too much about how to save and restore the overall state of the calculator. In this post, I’ll introduce a way around this problem.

Continue Reading…