Re: [akka-user] What is the best practice enforce Type Check for Actor during compilation

2015-01-25 Thread Sean Zhong
Thanks, The akka-typed https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fakka%2Fakka%2Fpull%2F16665sa=Dsntz=1usg=AFQjCNGA-XEDn6qAZsuXDu7o-8ayLGXjYw PR is exactly what I want. On Friday, January 23, 2015 at 11:44:25 PM UTC+8, Martynas Mickevičius wrote: Hi Sean, a good practice to

Re: [akka-user] What is the best practice enforce Type Check for Actor during compilation

2015-01-23 Thread Martynas Mickevičius
Hi Sean, a good practice to define messages that actor handles in actor's companion object. This is of course not enforced by compiler in anyway, but it is good code convention to follow. If you want more compiler help, you may want to check out Typed Actors

[akka-user] What is the best practice enforce Type Check for Actor during compilation

2015-01-22 Thread Sean Zhong
Suppose we have a servie actor: class Service extends Actor { def receive: Receive = { case RequestA(args) = doSomething() case RequestB(args) = doAnotherThing() } } // Some client is using RequestA indirectly, like this: class Source(request: RequestA) A client is trying to