An ActorRef in test code turns out to be dead. Who killed it? I can’t know: the type remains the same whether the ActorRef points to a dead, restarting or started Actor. Why can’t this be encoded in the type-system:
- lack of Hindley–Milner (or equivalent) derived linear typing (lightweight monadic regions are nifty)
- the need to maintain a workable Java API for Akka
Blegh. In theory Scala’s type-system is strong, but it’s inflexible enough that complex code turns quickly dynamic on some type, usually Any. Terribly annoying.