[PEAK] dispatch -- more specific

Simon Belak simon.belak at hruska.si
Tue Dec 13 15:56:49 EST 2005


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)?

Simon


-- 
Simon Belak
vodja projektnih skupin

e: simon.belak at hruska.si
---------------------------------------------------------------------
Hruska d.o.o., agencija za nove medije
Ilirska 21, SI-1000 Ljubljana

t: +386 1 430 25 86                      f: +386 1 430 25 87

s: http://www.hruska.si
s: http://akademija.hruska.si (izobrazevalni portal)
s: http://www.elor.si (kadrovski sistem letnih razgovorov)
------------------------------------------------------------------------
Hruska.si - socne resitve


To elektronsko sporocilo in vse morebitne priloge so poslovna  skrivnost 
in namenjene izkljucno naslovniku. Ce ste sporocilo prejeli  pomotoma, 
Vas prosimo, da obvestite posiljatelja, sporocilo pa takoj  unicite. 
Kakrsnokoli razkritje, distribucija ali kopiranje vsebine  sporocila je 
strogo prepovedano.

This e-mail and any attachments may contain confidential and/or 
privileged information and is intended solely for the addressee. If  you 
are not the intended recipient (or have received this e-mail in  error) 
please notify the sender immediately and destroy this e-mail.  Any 
unauthorized copying, disclosure or distribution of the material  in 
this e-mail, or any action taken or omitted to be taken in  reliance on 
it, is strictly prohibited.



More information about the PEAK mailing list