@charpov wrote:
I’m switching a small project from untyped actors to typed actors. I’m struggling with the fact that my untyped actors change ("
become
") actors with a different protocol. With typed actors,onMessage
is restricted to produce aBehavior[T]
for the sameT
(as far as I can tell, or a super type ofT
usingnarrow
). I end up with actors that can only meaningfully handle a subset of their message type, and with actors sharing parts of their protocols. The application works, but uses actors with types too broad for their actual behaviors, and I feel I’m not getting the type safety I would expect from the switch.
Posts: 1
Participants: 1