I\'m completely new to Scala, and I\'ve been working my way through Programming Scala (O\'Reilly) online; while doing so, I was surprised by the result of the
Actually, that seems reasonable enough. See, the actor is concurrent with the script, and none of the lines in the script wait for an answer. So it is perfectly possible for many messages to have been delivered to the actor before the actor decides to process any of them.
It then comes down to how should an actor go through its mailbox. It can go through it as a queue. But it could also go randomly through it, which provides some interesting properties.
My guess is that Scala 2.7.x, which was the version available when the book was written, used a queuing algorithm by default, while version 2.8.1 uses a random algorithm.