MOO-cows Mailing List Archive
Re: Scope resolution operator
Chuck Admas wrote:
> Is there any chance we could get a scope resolution operator or
> function for MOO? With that, we could properly implement many things
> that have to use $utils now, i.e.
> $object_utils:isa(obj, thing) ---> obj:$root_class::isa(thing)
> $perm_utils:controls(obj, who) ---> obj:$root_class::trusts(who)
> A new pass() function that lets you specify whichj parent to pass() to
> could be incredibly useful. Let's say you don't trust your PC owner
> not to mess with your :confunc (and you don't want to change player
> classes just yet).
> @program me:confunc
> return pass_to($player, @args);
> Skipping all intermediate parents, keeping the value of 'this' intact,
> and bypassing any evil stunts that may lie inbetween.
I'm sure anyone who has written an HTML generating verb on an object way up in a
hierachy on a Webbed MOO would find this addition a god-sent. You always want
the headers and footers added by #1, but sometimes the creaters of the rest have
had a taste bypass, or simply different ideas as to layout, and having to
massively patch the strings returned from a pass() to them is not fun. It would
also simplify porting webbed objects code without having to correctly port all
the parents' code too. PLEASE PLEASE PLEASE yes!
Subject Index |