# How can the actor model be applied to allow pure functional languages to have side-effects?

I just read this blog post which argues that monads might be too obscure or difficult to understand as the default "interface to the impure world" in purely functional programming languages; instead, it suggests that the actor model would be more comprehensible when it comes to pedagogy. That may be true -- I do think that actors are easier to understand than monads -- but the post leaves a lot to be desired. In particular, the author offers no examples of what this sort of actor-based purely-functional language would look like, and he doesn't seem to have followed up on the blog post since it was written a few years ago.

So my question is: in what way can actors be leveraged to capture side-effects in a purely functional way? How would source code in that hypothetical language look? What advantages/disadvantages would that approach offer in comparison to monads (outside of the cosmetic differences)?

Erlang is an example. I actually don't know Erlang, so I'm going to use some pseudocode:

Suppose you have two threads, Alice and Bob. They talk by calling each other's Send member route, which blocks until the other end replies. Alice can keep some "mutable state" for a single integer as follows:

Alice:
function main_loop(state):