I'd like to propose a new metamodel that (I hope) will meet all the
specs @Larry has stated thus far. This metamodel is in two parts.

Part the first:
There is a single object given to P6 called Factory. (No, Steve, there
are no turtles.) Factory has two behaviors, no state, and no classes.
The behaviors are:
    * create() - this will create a blank object with no behaviors or state.
    * set_behavior( $object, $name, $behavior) - this will assign
$behavior to $object callable by $name.

Part the second:
A set of keywords will be used to generate objects. That set of
keywords would include class and role. These objects do not have
classes - they are -things- in their own right. (Still no turtles,
Steve.) class and role, for instance, would be given the behaviors:
    * new() - the "constructor". This wraps Factory.create() and
Factory.set_behavior() appropriately. It's unclear whether each item
new() creates should have the methods within them or aliases to the
class's methods.
    * eat() - this would support composition through "has"
    * clone() - maybe?
Plus, whatever other behaviors is necessary. The keyword "is" would be
handled by adding in state (which is just a behavior wrapping some
data) to handle method redispatching to another object (the parent

Yes, this is very prototype-ish. But, the metamodel that Steve's been
working on is moving in that direction. Everything is an object
already. Let's just clear some of the cobwebs and provide a truly
clean interface.


Reply via email to