[DGD] Re: Probably an FAQ

E. Harte harte at xs4all.nl
Mon Jun 8 13:00:18 CEST 1998


On Sun, 7 Jun 1998, Ling wrote:

> This has probably been asked time and time again but I can't get answers
> any other way:

Yes, it's been asked before.  Greg, care to add it to the FAQ or is it
there already? :-)

> Is it bad to have an auto object with lots of functions?  (it's starting
> to look like a simul_efun object.)  I suppose I could put variable
> specific functions into 'libraries' and #include <array.h> which has a
> load of defines pointing at said 'libraries', kinda like the way
> Cold/Genesis does it by binding libraries to variables.  Hmmm..  That
> reminds me, how about an int * string kfun. ;)

I'll quote you Dworkin's answer:
<quote>
There is an obscure cost associated with functions in the auto object
that are neither static nor private: all such functions have a cost of
two bytes a piece in <every> inheriting object's program.  This is also
true for non-private functions in all other (i.e. non-auto) objects.

Normally, this is not much of a problem.  However, if you were to have
200 such functions in the auto object, every other program in the game
but that of the driver object would become 400 bytes larger.
</quote>

> PS: Does anyone have an archive of past postings on this mailing list I
> could read thru?

Can't help you with that, alas.  Anyone else?

Erwin.




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



More information about the DGD mailing list