I still think the design in the beam world is as close as we can get to perfect actors. Its very very elegant in how you can easily resume crashed actors, upgrade them, migrate them.
`handle_call(pattern, from, state)`
Return your reply and your new state and boom. It just works.
Yeah hot upgrades is something we'd love to get to, but probably won't be able to swing in a compiled language. We had worked out something ugly back in the day in a .net style environment (different library at a different job), but it still didn't compare to Erlang's hot upgrade flow.
If the actor fails, it could have failed mid-mutation so we can't trust the "state" object. This would be the same if we passed in an owned state (rather than a mutable reference) and the handler didn't reply with a new state object. If a failure happens, the state is dropped there too (in Rust). I know it's not exactly how Erlang handles it, but it's a tradeoff we've accepted in this case. We're open to suggestions however!
`handle_call(pattern, from, state)`
Return your reply and your new state and boom. It just works.