[PEAK] dispatch -- more specific
Phillip J. Eby
pje at telecommunity.com
Tue Dec 13 17:15:44 EST 2005
At 09:56 PM 12/13/2005 +0100, Simon Belak wrote:
>Phillip J. Eby wrote:
>>I'm not sure what usefulness you see in this idea, though, other than
>>that it allows you to omit the common condition for individual methods.
>
>What I have is basically a glorified type-casting system with two distinct
>modes of operation. It excepts either a pair (factory, type_wannabe) or
>(recipe_for_type, type_wannabe) where recipe_for_type can be in several
>different formats (classes) with default handlers (these are actually
>causing the problems otherwise it would be just a case of testing for
>interface compliance) for each branch. Since there will be many cases for
>each branch I would like to keep repetition down. As a nice bonus this
>would allow me to refractor the "root" cases if need be.
>
>Do you consider this to be a viable approach (in terms of generic function
>usage)?
Dunno, I still have no idea what you're actually doing. :) I need
examples, I think.
More information about the PEAK
mailing list