[243] in Coldmud discussion meeting
temporary alternative for no clear_param()?
daemon@ATHENA.MIT.EDU (Tue May 17 22:27:26 1994
)
Date: Tue, 17 May 1994 20:22:18 -0600 (MDT)
From: the Lyncx <BRANDON@cc.usu.edu>
To: coldstuff@MIT.EDU
X-Vms-To: COLDSTUFF
Ok, basically, I _really_ dont like the idea of having to copy an object just
to clear a parameter. You shouldn't have to do this. To explain I will map:
Object: $foo
Param: $root dbref 'foo
Param: $achoo zoo_param 'value
Param: $foo foo_param 'value
Parent: $foo
Object: $doo
Param: $root dbref 'doo
Param: $achoo zoo_param 'nuther_different_value
Param: $foo foo_param 'second_value
Now, I come along and remove foo_param from object $foo and it looks like:
Object: $foo
Param: $root dbref 'foo
Param: $achoo zoo_param 'value
Parent: $foo
Object: $doo
Param: $root dbref 'doo
Param: $achoo zoo_param 'nuther_different_value
Param: $foo foo_param 'second_value
NOW, on Object $doo foo_param still exists. This is because of encapsulation,
great, dandy. HOWEVER, I cannot access foo_param on $doo, nor can I _EVER_
remove foo_param from $doo, it will ALWAYS stay there collecting dust and
cobwebs! (grumble).
So, once again I would propose:
clear_parameter($defining_object, 'parameter)
Which is called from the object that it is currently residing on. This would
not break encapsulation, and it would fix what I see as a gaping wound in the
side of ColdMUD. Oh, and it would allow me to release a core the way I feel it
should be done (with objects uninitialized). With the above primitive and the
even further above example I could type:
(run by object $doo)
clear_param($foo, 'foo_param);
Which would remove it. (as del_param does on object $foo).
My implementation for this would be to have .uninit call clear_param for all
objects (assuming that clear_param does not DELETE the parameter on the
defining parent). Then when we do a core simply uninitialize all objects. I
am currently pondering having .uninit set all params as something obivously not
normal like 'this_is_a_corified_value_that_can_be_hosed_sometime Then we could
use a simple sed to remove the parameters from the database (but this is damn
ugly).
-Brandon/Lyncx-