[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

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

[Full Header] [Plain Text]
From: Phillip Lenhardt <philen@funky.monkey.org>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 28 Mar 2000 16:25:34 -0500
References: [1] [2] <-newest
Organization: Kanga.Nu
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@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev