Public and private visibility in Self
- Hi !
I've always wondered why the public and private visibility is just
notational in Self. I think there was something preventing the
visibility mechanism to working in Self, but can't remember exactly
what it was.
Is there any problem preventing a prototype language to implement
private visibility ? If there is something ... can you post an example ?
Thank you !
- Baltasar wrote on Sat, 24 Nov 2007 13:20:36 -0000
> I've always wondered why the public and private visibility is justNote that privacy declarations were active in Self 1.0 and 2.0 and
> notational in Self. I think there was something preventing the
> visibility mechanism to working in Self, but can't remember exactly
> what it was.
> Is there any problem preventing a prototype language to implement
> private visibility ? If there is something ... can you post an example ?
became mere declarations in Self 3.0. Other related features that were
removed in this language redesign were the parent priotities and the
"tie breaker rules". If you look at some of the older papers you can
find out many details about these things.
The reason that these features were removed was that many times it
wasn't abvious to a programmer which of several slots with the same name
would actually be picked by the system. Though each rule was simple
enough on its own, the interaction between them made for a very
unpredictable system. One alternative would have been to remove some of
these while leaving some others (like privacy, for example) in, but it
was fealt that this was the wrong direction in general and that it was
better to leave them all out until a proper solution could be found.
One experiment in this area was an extension of Self called "Us". This
explored subjective programming (where the look up depends not only on
the receiver and message name but also on the sending context) as a
possible solution to privacy, security and other issues. I don't know if
the authors still feel this is a good solution to the problem, but I
like it very much.
- Dear Jecel:
> Then I won't remove the filter's comment from the subject. I don't knowYes, that's true ;-). Thank you.
> if that will help or make things worse.
> The people who actually made the changes for Self 3.0 would have toYep, that would be fantastic.
> comment on this.
> Normal sends didn't see private slots but self sendsThat was the explanation I was exactly looking for. Thank you very
> did, even if these slots were inherited. And any object could change
> itself to inherit from you at runtime, so it would have full access to
> all of your slots no matter what their privacy declarations were. It was
> felt that something better would have to be developed.
My motivation about all of this was to decide if it could be any
problem about the privacy feature of my own project, Zero:
Provided Zero does only support simple inheritance, and that it doesn't
show thta problems, I assume I'm safe.
PBC -- J. Baltasar García Perez-Schofield
jbgarcia en uvigo de es http://webs.uvigo.es/jbgarcia/
Dep. Informática, Universidad de Vigo, España (Spain)