[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

occam and inheritance and delegation



Sirs

Q1. Does occam support inheritance?
    In its own way think it does. 

    I have PROC Inner, connected via CHAN OF Base in, out.
    I wrap PROC Outer, connected via 
      CHAN OF Base in, out *and* CHAN OF Extended ein, eout.
    Outer intercepts all messages coming on in and sends it
    over to Inner's-in or processes it itself. I have modified
    the behaviour.
    Should the user decide to connect to channels ein and 
    eout, extended functionality is acquired.
    We have acquired a kind of polymorphism which is explicit,
    which excludes use of that word, but anyhow..
    If a client just sends on CHAN OF Base, it will not know
    how we have decided to connect it: in one case to Inner,
    the next case to Outer.
    
Q2. Does occam support delegation?
    In its own way think it does. 
    
    Should Inner decide to have somebody else, or an array
    of somebody else'es, do a job for it, we could just send
    an index (over a channel) pointing to which element of 
    delagatedChannelArray we need in order to have our job
    done. Inner is, as always with occam, not aware who
    it is talking to, it may be this proc or that proc.
    We connect that on the outside.  
    By the way, what's the difference between delegation and
    callback?

Am I right?

Cheers,  

-------------------------------------------------------------------
 Oyvind Teig                              oyvind.teig@xxxxxxxxxxxx
 Autronica AS                             oyvind.teig@xxxxxxxxxxxx
 7005 Trondhem                               Tel.: +47 73 58 12 68
 Norway                                      Fax.: +47 73 91 93 20
-------------------------------------------------------------------