From: Intransition Date: 2010-02-12T10:33:36+09:00 Subject: Re: "Code must be Chunkable" On Feb 11, 5:07 pm, Brian Candler wrote: > Here's a noddy version (minus annotations) > > http://gist.github.com/302016 Very nice --very clean. That close to how first thought about it too, but some of those other ideas came to mind in the processes and I wanted to experiment with them to see how they would play out. I think you are right that the "role dispatching" is too magic. I like it in the sense that it feels like a natural fit for concurrent processing. However, at the very least, there needs to be a way to do it explicitly as you have done. The class level casting on the other hand, I am finding very appealing. The reason being that it provides a very natural limiting structure to scope of a context, i.e. one role per attribute per context. By casting at the instance level, a context can do anything whatsoever, each method could take actions completely unrelated. But having the casting the at the class level ensures the methods will have a interrelated coherence.