[self-interest] Re: Object identity (Was: No Subject)

Douglas Atique datique at alcatel.com.br
Tue Jun 8 13:49:35 UTC 1999

What an interesting discussion... I hope to give a contribution to it. Please see my
comments below.

silveira at lsi.usp.br wrote:

> "Jose' B. Garcia Perez-Schofield" wrote:
> > > I'll try to help.
> > >
> >         Thank yo for your help.
> >
> > > OK! What Jecel means is that ANY object that have a name, can give a name to
> > > an unnamed object. (sorry about my english...:.P)
> > >
> >
> >         OK ! After doing the complete BankAccount example, now these things
> > are more clear for me. But I still can't understand why the fact of
> > giving a name to an object is so complex....
> >
> I don't know!  :.(

I would say it is not so complex. It's just that people are so used to having things
with names that they don't notice that the name is not so essential, rather it is a
way of reaching an object. If you know about the Unix filesystem you can think about
the files as "objects". There files exist on their own, but they must be referred to
by at least one directory, otherwise they are unreachable and nobody can get them.
If you create hard links, you can have more than one reference to the same file. So
you give the same file different names. Understood? Now substitute "object" for
"file" in the sentence above and see my point of view on all this naming stuff. More
on this below...

> >
> > > Voilá, the name is given... You unnamed object will be renamed to 'shell
> > > myCard'.
> > >
> >
> >         Yes, but... it depends on the existence of Shell.... and, if it
> > is not registered into the globals, no messages can be sent to him.
> >
> I don't think so! any object can receive messages, even the unnamed ones.
> It's' enough the object be referred by the one who wants to send the message to
> it,
> for example having an slot pointing to it. (sorry it's' my english again :.)), I
> mean
> The object who wants to send a message should have an slot pointing to the
> unnamed
> object. This way you can send messages without problems...
> For example, the objects of the parser "mango" have no name. See in
> globals-applications.
> >
> >
> > > IMPORTANT: Be careful on what object you are using in this on your
> > > experiments.
> > > I took a system object (shell), so I don't recommend saving this image after
> > > all...
> >
> >         Ok !.
> >
> > > >         I think it is not trivial. Why not an slot added automatically
> > > > to any object, with the default contents ' an object ', which
> > > > should be editable ?
> > > >
> > >
> > > I didn't understand the question!
> >
> >         Probably because of my english.
> >
> >         Ok. I think that all objects must have a name (*). The only way to
> > give a name to an object in Self is creating a 'creator method' in other
> > object (globals or traits, as I learn yesterday, if you want to send
> > messages to this object).
> >

Perhaps you haven't thought about the difference between a name and an identity.
Every object MUST have an identity, otherwise it gets useless for other objects.
This identity can be present in an implementation-defined ObjectID (that you never
care about when programming, and it is not uniquely assigned across different
sessions) or the address of the object memory in the heap. But it is always there,
even though in Self you might not have access to it. Now the name is something else,
a kind of identity that is visible at the Self level. But it takes the form of an
object tree. You can see that this identity is relative to the tree you choose and
it can be changed if the implementation changes the root. With the present VM there
is an object that is known as the lobby, which is the root of all names. When you
create any object or write Self code you have to take account of this object as
everything on the system is hanging from it. All the resources of the system are
accessible as objects and an object is only accessible because it is referenced
somehow by the lobby. Also, the lobby is created by the VM, it already exists when
you start Self, even in an empty world. Try to load the empty world (host$
Self<Enter>) and evaluate an expression on the prompt that appears. You are sending
a message to the lobby. But you can't call it lobby, like this:
lobby help
because the name lobby doesn't exist. But that object is the root, anything you type
at the prompt will be evaluated in the context of that object (I mean, as a message
sent to it). Who made it that way? The VM implementation, the language philosophy,
etc. Anyway, it is there and you have to know it to start building a big world like
the one you might be running on your SPARC. How have the Self Group come to that
world? Just so. I, and more people with whom I have already "talked", believe that
in proper time, most operating systems will change the notion of filesystem for this
of an object tree. Solaris (I don't work for Sun) already does something interesting
to determine the file type by its contents. It displays an appropriate icon for
every type of file it knows about. I guess it parses the file contents, or its
beginning, but regardless of the file extension ( I have tried it) the CDE displays
the correct icon. That is the way to OO.

> >         But why you have to do all this work ?
> >
> >         Why not a slot 'name' into the object, created automatically with
> > him ?   - with, if you want, the contents of "an object" by default -.
> >
> >         I can't understand why the name of an object is linked with the
> > visibility of him.
> >
> Well Jose, i am a beginner too. Some things belong to the "philosophy field of
> implementation". I guess it's because of the searching in the object tree,
> if you want the object be available all over the world you must put it in
> an accessible way in the searching path. Just like Smalltalk, a class or global
> variable must be in the Smalltalk dictionary, the difference is that it's
> automatically
> made when you create the class. <<Someone correct me if i'm wrong...>>.
> May be someone else could help us in this field!
> >
> >         Salud !
> >
> >                 jose
> >
> > (*) At lest they have an OID (object identification), although they are
> > named as 'an opbject'.
> Reinaldo
> ------------------------------------------------------------------------
> eGroups Spotlight:
> "NBA Digest" - Get all the NBA news and statistics
> you can handle.  http://clickhere.egroups.com/click/114
> eGroups.com home: http://www.egroups.com/group/self-interest
> http://www.egroups.com - Simplifying group communications


eGroups.com home: http://www.egroups.com/group/self-interest
http://www.egroups.com - Simplifying group communications

More information about the Self-interest mailing list