[DGD]DGD and Melville

Stephen Schmidt schmidsj at union.edu
Fri Jan 12 05:10:17 CET 2001


On Thu, 11 Jan 2001, Nightlith wrote:
> Is it possible to have creation.c inherit or include player.c instead?

Not include. It is almost never correct (I am tempted
to say literally never) to include code rather than
inherit it. It duplicates the memory use and has no
advantages that are coming to my mind.

Inheriting it would work, except that then you'd have
two different objects which acted like player bodies;
one the one with the creation code (cloned from creation.c)
and the other without (cloned from player.c). When you
created a new character, you'd get the creation.c
version of the body; subsequently, the other. Or you
could do a body swap at the end of the creation
process. It'd work, and it'd waste less memory,
but it's aesthetically unpleasant, to me anyway.

Steve




List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list