swarm-support
[Top][All Lists]
Advanced

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

DefObj


From: glen e. p. ropella
Subject: DefObj
Date: Wed, 1 May 2002 10:04:25 -0700

I wonder if we should start a project to re-implement some of the core
features of Swarm?  I'd like the SDG to someday look a little more like the
Boost project <www.boost.org>.

This "feature" of the defobj library could be broken out into the "object
lifecycle" feature, or somesuch.  I'd be interested in trying to implement
this.  My only problem is that I don't like C++ very much. [grin]  There's
bound to be a better language to do this in.  Eiffel?  CLOS?

At 5:02 PM -0600 4/30/02, Marcus G. Daniels wrote:
> >>>>> "MD" == Marcus G Daniels <address@hidden> writes:
>
>MD> It should be possible to implement a scheme like this
>MD> (i.e. alternative predefined groups of methods for the same
>MD> physical object) using multiple inheritance in C++ and virtual
>MD> methods.
>
>Hmm, let me be more specific.  Take for example the case of List
>inheriting from a Collection.  In Swarm, there are these distinct
>items:
>
>Object state:
>1. The state of the Collection.  Just `number of items', basically.       [CO]
>2. The state of the List.        A linked list or set of threaded objects [LO]
>
>Methods that [always] make sense for resetting the state of object:
>(e.g. serialization methods, setters)
>3. The methods valid for a Collection in either Creating or Using phase   [CS]
>4. The methods valid for a List in either Creating or Using phase         [LS]
>
>Methods that only make sense for the construction of an object:
>5. The create-time methods valid for a Collection                         [CC]
>6. The create-time methods valid for a List                               [CL]
>
>In the Swarm Objective C implementation single inheritance is all that
>is needed since it the multi-phase templates that are inherited.  It's
>a question of trimming from the total possible dispatch table to get
>the set of valid methods for a given phase.
>
>However, in C++, each group could be a different class and specialization
>could be done per phase.  Composites like LC and LU would be done by
>multiple inheritance
>
>    CO -> CS -> CC -> LC <- LS <- LO
>             \> CU -> LU </
>           
>
>                  ==================================
>   Swarm-Support is for discussion of the technical details of the day
>   to day usage of Swarm.  For list administration needs (esp.
>   [un]subscribing), please send a message to <address@hidden>
>   with "help" in the body of the message.


-- 
-- glen e. p. ropella                              =><=                         
    Hail Eris!
"...the closest thing to a genuine panacea- known to medical science is
work." -- T. Szasz
Home: 831.335.4950                          =><=              Cell: 831.247.7901

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]