Hi --

On Sun, 7 Jul 2002, Dossy wrote:

> On 2002.07.06, David Alan Black <dblack / candle.superlink.net> wrote:
> >
> > Also (again, the terminological problem), the thing we're talking
> > about here isn't a traditional OO inheritance or parent/child
> > relationship, but rather the matter of an object knowing what the
> > value of "self" was at the time that it was instantiated.  I've found
> > the thread interesting, though I'm still not convinced that this
> > notion has a place in good Ruby code design.
>
> Is there a concrete example where the only way to implement something
> is to know what the value of "self" was at the time the object was
> instantiated?  I can't think of one, which doesn't mean there isn't
> one, but any example I try to think of, I can think of a better way
> of doing it that doesn't require knowing what "self" was ...

I can't think of an example either -- and actually, I think it's
something that objects really shouldn't know or use, because it breaks
encapsulation (as per earlier posts).

I was just pointing out that Tom's notion of objects knowing the
object which was "self" at their creation, whatever its merits, isn't
about OO inheritance in the usual sense(s).  That is, we're not
talking about an object knowing what its class is, or that class's
superclass, etc.


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav