[self-interest] inheritance in Self

David Ungar David.Ungar at Sun.COM
Thu Sep 19 00:26:29 UTC 2002


Steve,

Not exactly, but close.

There is no object proto, but many objects inherit from "traits 
clonable" which
in turn inherits from the lobby.

The lobby is not an instance of an Object--there is no such concept in 
Self.
Not every object is guaranteed to respond to any particular message.
If you want to do "reflective" things to an object, things unrelated to 
its
role in a computation but more about showing the programmer the object,
you first get a mirror for the object. That's accomplished by a method 
that takes
the object in question as an argument.

Lookup loops *are* allowed in Self. The virtual machine simply stops 
following parent links
if it gets to an object it has already traversed.

Hope this helps,

- Dave



On Wednesday, September 18, 2002, at 05:15  PM, Steve Dekorte wrote:

>
> Do I have this right?:
>
> 1. The Object proto delegates to the Lobby (so lookup for "globals" in
> objects inheriting from the Object proto get found)
> 2. The Lobby is an instance of an Object(so it can deal with messages
> like "respondsTo:" etc)
>
> If so, how are lookup loops avoided? (Something not found in the Object
> proto goes to the lobby, isn't found there so it gets sent to the 
> Object
> proto)
>
> Cheers,
> Steve
>
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>




More information about the Self-interest mailing list