3 ms·
Looking forward to typed channels. I always found it very unfortunate that a scala library would throw away the language's wonderful type safety.
by lmm 13y ago
Looking forward to typed channels. I always found it very unfortunate that a scala library would throw away the language's wonderful type safety.
- DannoHung 13y agoThis wasn't really possible until the addition of the Macro and enhanced reflection systems in the most recent versions of Scala. Type information isn't stable across all runtime environments. They had to come up with a way to generate proper types for distribution on the fly. Someone correct me if I'm mischaracterizing this please. I'm only a little familiar with the new typed channels.
- bad_user 13y agoAkka already had typed actors, but most of the times they are useless. The problem with actors is that they can change their interface at runtime. Very useful if you want to model state machines for example (see context.become or the FSM helpers) and it's one reason why actors are awesome. Actors can also get their messages from multiple sources. The messages that you (the user of an actor) can send to an actor can be very different from the messages that an actor receives from other actors that it communicates with. The example given for Tcp-IO should drive this point across: http://doc.akka.io/docs/akka/2.2.0-RC1/scala/io-tcp.html http://doc.akka.io/docs/akka/2.2.0-RC1/scala/io-tcp.html