[DGD] Greetings, and a couple of small questions

Felix A. Croes felix at dworkin.nl
Sat Feb 7 12:25:52 CET 2004


Steve Wooster <swooster at xprt.net> wrote:

> I had a couple of questions...
>
> 1. Is there a reason why the Klib separates clonables/libraries/etc based 
> on directories rather than file extensions? (for example, why not have 
> inheritables be /path/obj.i and clonables be /path/obj.c?)

Mostly because the kernel lib is older than DGD's ability to compile
directly from a string, instead of from a file.  Also because the
difference does not only have to be known at compile time, but also
at runtime afterward.  How will you know whether an object named
"/path/obj" is an inheritable?  If you want to put that information
in the object name, you'd have to name it "/path/obj.i", which
would seem to suggest that it was compiled from /path/obj.i.c.

But these are matters mostly of personal preference.  Compilation from
string explicitly makes it possible to do away with the standard object
naming scheme.


> 2. Would it be difficult or a bad idea for DGD to have some kind of 
> immediate_call_out("func") function that's like call_out("func",0), but 
> makes sure the new thread is the next one called? It seems like many people 
> have talked about making code that requires multiple consecutive threads, 
> and they have to go through a lot of trouble by suspending call_outs and 
> blocking user input. I just figured something like this would make all that 
> work unnecessary.

I would consider it a bad idea.  People often prefer that the driver
programmer goes through a lot of trouble instead of themselves :)  In
any event, the functionality to suspend callouts is implemented in the
kernel lib which is in the public domain, so whatever the trouble is,
it surely is not in the programming.

Being able to suspend callouts also makes other things possible.  For
example, you could put the mud into single-user mode, suspending
callouts for all but your user object, and blocking input for
everyone but yourself, giving you time to implement an emergency
measure of some kind.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list