[35] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: clear parameters

daemon@ATHENA.MIT.EDU (Tue Nov 16 18:04:32 1993 )

To: Quinn Avery <quinn@DUS.Mountain.Net>
Cc: deforest@netcom.com, ghudson@MIT.EDU, coldstuff@MIT.EDU
In-Reply-To: Your message of Tue, 16 Nov 93 17:10:12 -0500.
Date: Tue, 16 Nov 93 17:56:05 EST
From: Greg Hudson <ghudson@MIT.EDU>

I'm familiar with clear properties on MOO, yes.

>> In other words, you want a method on one object to change variable
>> values on another object (it's children).

> Not exactly.  I think he just wanted unchanged values to reflect the
> -current- value of their parent, and not the original.

This is equivalent to changing a variable value (that is, the value
you get when you evaluate a variable) on a child by setting a variable
on a parent.  This is fine in MOO, a system with no encapsulation, but
not okay in an encapsulated system.

Among other things, this means that "x = x;" is a statement with some
effect, a counterintuitive notion.

If you want to specify a default for a parameter that you can set on
the parent, simply change the accessor method:

	return foo || definer().foo();

or, if foo might be set but false:

	return (foo == 'clear) ? definer().foo() | foo;