[Home] [Groups] - Message: [Prev in Group] [Next in Group]
621: Re: [MUD-Dev] "short" Introductory Message (fwd)
[Full Header] [Plain Text]
From: "Chris Gray" <cg@ami-cg.GraySage.Edmonton.AB.CA>
Newsgroups: nu.kanga.list.mud-dev
Date: Sun, 8 Jun 97 09:35:13 MST
Organization: Kanga.Nu
[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@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@ami-cg.GraySage.Edmonton.AB.CA