Actor programming with static guarantees