[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

1307: Re: [MUD-Dev] Introduction

[Full Header] [Plain Text]
From: "Chris Gray" <cg@ami-cg.GraySage.Edmonton.AB.CA>
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 12 May 97 08:26:27 MST
Organization: Kanga.Nu
[Dan R:]

:I'm still mixed on how this will work.  Part of me wants all programs
:to be 'special' and live in their own little space.  Part of me wants
:the model of attaching code to objects, and the rest of me wants
:*everything* to be coded functions.  (For example, my description can
:be a function that just returns a string, or actually does a bunch of
:work and returns the string based on calculation and lookups).

So do both! Can you have conditional code at run time based on whether
or not a property is present on an object? If so, just do something
like (excuse the AmigaMUD syntax):

    action := object@descFunc;
    if action ~= nil then
	description := call(action)(object);
    else
	description := object@descString;
    fi;

That way you can have special funcs when you need them, otherwise just
have straight strings, which will take up less space.

:(FWIW, someone mentioned that process context switching was
:expensive.  This is true, but your server is going to be switched out
:anyways, as it's unlikely that nothing else is running on the machine
:at all.)

Yes it is true. It will also make quite a lot of difference. It is an
*added* overhead over other work the machine is doing.

Also, all the commercial UNIXes I've worked with have SysV semaphores
and shared-memory segments, so you can probably safely use those.

--
Chris Gray   cg@ami-cg.GraySage.Edmonton.AB.CA