ActorRef has a self type of ActorRefImpl.  This means that if I want to 
fake/stub/mock an ActorRef for test purposes, I cannot because I am forced 
to know about ActorRefImpl.  Instead of users of ActorRef being forced to 
only use the ActorRefImpl implementation, ActorRef should be a minimal 
interface that only exposes the essential characteristics of an ActorRef, 
freeing up users to chose among implementations of ActorRef, including 
fakes/stubs/mocks for testing, and an ActorRefImpl for production.  As it 
is designed now, I don't see how one can easily test akka.typed code 
without specialized libraries that know about ActorRefImpl.

I find that hard to test code is usually a result of design decisions 
rather than the inherent nature of the problem, and with careful attention 
and imagination one can make code easy to test without having to use a 
specialized library.

I am just starting to learn akka typed, so hopefully I will have time to 
give more detailed feedback than just the one example once I am more 
familiar with the design.  I am hoping that before removing the warning 
about how the akka.typed API and semantics may change, the design is 
refactored to support a more test driven, design by contract approach.  I 
love the idea of having a statically typed, event driven option for how I 
code, so am really glad akka.typed is being worked on.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to