[DGD] Couple DGD questions
Stephen Schmidt
schmidsj at union.edu
Tue Jun 9 07:42:56 CEST 1998
The first concerns static functions in the auto object. The
Introduction file says that these functions "behave like kfuns"
and gives the example that they cannot be call_othered. My
question is, are they like kfuns in any other sense? Specifically,
if I have a static function in the auto object which redefines
a kfun, does it have to be nomask also? Dworkin has written:
> calls to [such functions] are not redirected if the function is masked.
and does that mean that I don't have to specifically make it
nomask? What happens if I define (say) write_file() as a static
function in the auto object and another object does ::write_file()?
What happens if the other object defines its own write_file()? And
does either answer change if write_file() is nomask? From what
Dworkin has written it seems to me that if write_file() is static
in the auto object, then it is implicitly nomask as well, and
there is no bypassing it. But I'd like to be sure.
And: do -any- of the above answers change if the function in the
auto object is not masking a kfun, but is just a plain old function?
For instance, valid_write()? I guess that valid_write() needs to be
both static and nomask.
Second, and unrelated; it is now the case that when an object is
compiled, create() is not called right away; it's called only
when the first function is called in the object. This caused me
a great deal of headache tonight when I couldn't figure out why
create() was not running, which was solved when I RTFM. :)
Question is, why was this changed? It seems unintuitive for
master copies of objects not to invoke create(), I find myself
having to code around it (not hard to do) but in general I do
not see a way for the mudlib programmer to alter this behavior
except to have compile_object() be redefined and call some function
in any non-clone object it compiles. Would there be a Bad side
effect if I did that?
Stephen Schmidt
A general who husbands his reserve until the day following a battle
is commonly, and deservedly, beaten.
- Napoleon
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list