[MUD-Dev] "short" Introductory Message (fwd)

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Sun Jun 8 09:35:13 CEST 1997


[Jeff K:]
:I'm mixed on this.... my big issue is that in an object-ortiented labuage
:compilke-time checking means compile time checking for method
:avauilablility.  Ilike Cold's Smalltalk like facility to add new methdos to
:an obejct on the fly and not check for availability therefor til run-time.

Only if you don't add a wart to work around it. In my strongly typed MUD
language, I can check for and call a dynamic method like this:

    action a;
    <expected return type> result;

    a := thingPtr at methodProperty;
    if a ~= nil then
	result := call(a, <expected return type>)(<parameters>);
    fi;

Here, the run-time checking is on the parameters and result of the
dynamically found function 'a'. Outside of the 'call' operation, no
run-time type checks are needed. A mismatch in the 'call' results in
an error message, and a (sort-of) symbolic traceback.

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



More information about the mud-dev-archive mailing list