[PEAK] PyProtocols --

Gabriel Jägenstedt gabriel.j at telia.com
Mon Feb 16 10:17:09 EST 2004


I should most likely try to explain this in more detail.

1. A noun should be able to be instantiated and be usable as an everyday
object like maybe a rock. 

2. Making more complex items like doors would mean implementing new
behaviour. We need to have the door lead somewhere they should be able
to be locked and opened. In the current(working) object system this is
done by ways of inheritance. However when we have walked down a line of
say 5 inheritences it's getting hard to understand what it really does.
The code is cluttered and so on. Furthermore if we wish to add more than
one subclass of Noun into a new objects we have to use multiple
inheritence. I have heard from some that this is not a good idea.

3. I also wish that as time passes this makeover on the code will make
it easier to implement a more pretty aproach to prefixes such as on and
with. Put money on table, hit man with gun and so on.

4. I want methods and variables to be easily obtainable for interaction
between a nouns interfaces. Edible should be able to call up Poisonous
to check for special effects of eating a poisonous mushroom.

5. I want the ability to not overwrite existing functions unless I
declare that it should be done, but instead be able to add to existing
methods.  Or atleast have a way to determine which method should be used
depending on action, I guess this is right up the alley for
interfaces/adapters.  

6. features like edible and such will most likely be added to a subclass
of noun and be used as objects in a library for the use of authors. The
main purpose of looking into interfaces is the hope that it should make
life easier for the author.

7. Default error messages when objects don't support certain intefaces.
or is it the other way around?

I think this pretty much sums it all up. I hope this straightens out
some questionmarks.




-- 
//gabriel - a true believer



More information about the PEAK mailing list