[MUD-Dev] Object and class heirarchies -- are they really necessary?

Phillip Lenhardt philen at funky.monkey.org
Tue Mar 28 16:25:34 New Zealand Daylight Time 2000


On Tue, Mar 28, 2000 at 10:48:50AM +1000, Kevin Littlejohn wrote:
> This approach, I've got to say, seemed completely natural - it was a first
> principle in the very first design docs for Moebius.  I'm somewhat
> surprised anyone builds these days in systems where objects _are_
> fundamentally different.  An object is an object is an object.

I find this approach completely unnatural myself. Once you get away
from clean hierarchies and start bolting attributes and methods onto
just any object you start losing your view into an object's structure
and purpose.

For example, if a door is just a regular object with open and close
methods and link attributes pointing at two other roomish objects,
how do you determine if it is a door at all? In a class hierarchy,
you can ask for the class or type of an object. If that class or
type is or is descended from the door class, you know you have a
door object. With just a base class, you have to check for all
relevant methods and attributes before treating that object like
a door.



_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list