Mark Elston (132) [Avatar] Offline
You said on p. 78 that Akka uses a Stack to keep track of behavior changes when using 'become'. You even mention 'pushing' and 'popping' these behaviors.

However, in the examples you don't show this at all. I don't see how 'become' uses a stack here or how we push or pop anything. You even mention in your notes on the 'become' calls that we 'replace the top of the stack'.

This has left me wondering why you brought up the concept of a stack at all. It just leaves me uneasy as to what is really happening. At this point in the discussion if you were to just say that become simply replaces the current message handling code with the replacement it would be clearer, I think. If the presence of a stack becomes important later then you can amend your description (giving more detail) when it is useful to do so.