MOO-cows Mailing List Archive


Re: Cross-MOO OOP Code Sharing (WAS: "verbing properties" and related issues)

At 11:43 PM 8/1/96 PDT, Fiona McCrae wrote:
> The problem with sharing generic objects between moos is not encapsulation,
> but object number reconciliation.  I know Quinn's Generic Clothing is shared
> on many MOOs, I ported it to my own once.  It was a fornicating pain in the
> donkey, all because my object numbers had no chance in purgatory of matching
> those of the source MOO.

	If you want to customize object numbers without adding spam to #0,
you could create private properties on the object and use these private
properties instead of literal object numbers.  The problem you discuss
certainly is an issue with the sharing of objects across MOOs, but it is a
subset of the encapsulation problem.  If you wanted a portable object that
needed to know specific dbrefs, it could keep a private record of these
dbrefs and reference these properties from public methods.  It could have
a verb :configure() that was called with a list of object numbers, or it
could call some server verb that called $configure(), for instance after
or #99 could issue calls like
this.player_class = $configure("player class") (which => #6)

In fact, all objects *should* do this but programmers have exploited the
lack of enforced encapsulation to create objects dependent on private data
on other objects and on actual object numbers rather than references
obtained locally. Encapsulation is the fundamental basis and goal of
object-oriented programming, but standard MOO programming violates it

--Nick Ingolia



Home | Subject Index | Thread Index