[DGD] Inheriting the same program twice

Petter Nyström md1pette at mdstud.chalmers.se
Tue Apr 19 15:14:01 CEST 2005


On Tue, 19 Apr 2005, Par Winzell wrote:

> Well, DGD allows the inheritance tree you describe, and it's a perfectly good
> alternative to using prototypes... if B needs to make calls on X, it can
> either prototype the functions and trust that its inheritor (the eventual A)
> will inherit X -- basically making it an abstract class -- or it can directly
> inherit X.
>
> Unfortunately for you, DGD makes sure only one copy of X is inherited in
> toto. If you need A and B to access different instances of X, then what you
> need is probably not inheritance. I suggest a LWO.

Okay, this clarifies things. Thanks!

> This is an old subject and I hate to be reflexive about it, but I do urge you 
> to reconsider the object-oriented approach to parsing. Humans don't work that 
> way. If a verb works in the attic of a dusty house, they expect that verb to 
> work in a tall clearing. The parser -- at least for in-game things -- should 
> be central and static. That said, obviously local objects can have different 
> capabilities and reactions to actions caused by verbs.

Yes, by following discussions on this list and elsewhere I have understood 
that the approach you speak of is the more favorable. And I am not at all 
opposed to implementing such a model, but right now I would like to try 
this object-oriented thing out.

Actually, I suspected this to be brought up and that is why I didn't speak 
of the actual setting of the problem in my first mail. ;)

The main reason that I have choosen not to implement one central command 
parser for in-game verbs is because I lack good knowledge of how such a 
model should work. I have a clear idea of how I could go ahead and create 
an interesting command environment using an object-oriented approach, but 
for a central approach I am not at all as sure of what is important to 
think of, etc..

But your mail have had intended effect, and I find myself indeed 
reconsidering. I will for sure give it some more thought. Maybe I will 
come up with something that I feel sure enough about to replace my current 
plans.

I know that you at Skotos have done things like this, and if you have any 
online material covering this, please point me there. (I vaguely recall 
reading some article over at your website, but can't find it in a brief 
search.)

I thank you now for your mail, and maybe I will thank you again someday 
in the future for forcing me to think twice. =)

Thanks,

Jimorie



More information about the DGD mailing list