Subject: Re: Encapsulation

From: [email-masked] (Ian McFarland)
Date: Sat, 20 Nov 1993 13:50:29 -0800

At 12:31 PM 11/20/93 -0800, Pavel Curtis wrote:
>> Date: Sat, 20 Nov 1993 09:38:48 -0800
>> From: [email-masked] (Gustavo Glusman)
>> 
>> for a relatively easy implementation of one aspect of object-orientedness
>> that MOO lacks - encapsulation.
>> 
>> I think most of the existing MOOcode wouldn't crash with such a change, but
>> I haven't probed too deeply.
>
>I think you're wrong here.
>
>> How difficult would it be to implement this?
>
>It would be more-or-less straightforward to implement this.
>
>> Do people think it would be useful?
>
>I might agree that it was a good idea, if I were working from a clean slate; as
>I am not doing so, I think it's too wildly incompatible for consideration.
>
>> Would it break existing code too badly?
>
>I believe so.
>
>        Pavel

I personally think that encapsulation is of enough value that the problems
are worth looking at. Another possibility is for the programmer to set an
'encapsulation bit' which says to the interpreter that access is restricted
to the encapsulation model. This could be done in two ways:

1) an object could have an encapsulation bit, or

2) each property could have an encapsulation bit.

This sort of explicit declaration (via chmod) should allow the interpreter
to work normally with all previous code. Shouldn't it?

What are some of the problems you forsee? I'm sure we MOO-Cows types would
do our best to solve them.

I would love encapsulation.

-Ian (Hannes@Lambda, IanM@Media)
--
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
| imf@netcom,com  or  [email-masked]                Jeste pivo, prosim! |
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#

---

From: Pavel Curtis <[email-masked]>
Date: Sat, 20 Nov 1993 15:08:43 -0800

> Date:	Sat, 20 Nov 1993 13:50:29 -0800
> From:	[email-masked] (Ian McFarland)
> 

Yes, but I object to adding yet another bunch of hair on top of an already too
hairy object model.  I think that the current permissions systems gives
programmers enough flexibility in the encapsulation department that it's not
worth adding more hair for it to the language.

	Pavel