Re: [akka-user] Re: Actor Polymorphism

2014-02-20 Thread Jonas Bonér
Awesome. Thanks Konrad. On Thu, Feb 20, 2014 at 1:16 PM, Patrik Nordwall patrik.nordw...@gmail.comwrote: On Thu, Feb 20, 2014 at 12:54 AM, Konrad Malawski ktos...@gmail.comwrote: Pull requested here https://github.com/akka/akka/pull/2023 Tested on a few friends if it's understandable,

Re: [akka-user] Re: Actor Polymorphism

2014-02-19 Thread Konrad Malawski
Pull requested here https://github.com/akka/akka/pull/2023 Tested on a few friends if it's understandable, seems to be ok :-) -- cheers, k -- Read the docs: http://akka.io/docs/ Check the FAQ: http://akka.io/faq/ Search the archives: https://groups.google.com/group/akka-user

[akka-user] Re: Actor Polymorphism

2014-02-18 Thread Konrad Malawski
Hello Peter, One idea you might give a spin is to extract actor behaviors into traits, and compose behavior of a concrete actor using those. This can work because `receive` is basically just a `PartialFunction[Any, Unit]`, and those have a nice method called

Re: [akka-user] Re: Actor Polymorphism

2014-02-18 Thread Jonas Bonér
Thanks Konrad. This pattern is somehow documented here: http://doc.akka.io/docs/akka/snapshot/scala/actors.html#Extending_Actors_using_PartialFunction_chaining Could perhaps be improved though. On Tue, Feb 18, 2014 at 9:52 PM, Konrad Malawski ktos...@gmail.com wrote: Hello Peter, One idea you

[akka-user] Re: Actor Polymorphism

2014-02-18 Thread Peter Wolf
Thank you Konrad. That's perfect. I was afraid that I'd asked a dumb obvious question. But I'm glad, I did because I would not have found that on my own -- Read the docs: http://akka.io/docs/ Check the FAQ: http://akka.io/faq/ Search the archives:

Re: [akka-user] Re: Actor Polymorphism

2014-02-18 Thread Konrad Malawski
There's far less dumb questions than there are dumb answers :-) @Jonas: Cool! Perhaps an example like the above would showcase the feature better - will think about a simple PR for it :-) -- Cheers, Konrad Malawski blog.project13.pl | java.pl | geecon.org | gdgkrakow.pl | krakowscala.pl