On Sat, 6 Jul 2002 03:32:11 +0900, Tom Sawyer wrote:
> On Fri, 2002-07-05 at 05:31, Massimiliano Mirra wrote:
>> C'mon, for an object to be coupled to the one where it was
>> created is still a specific case, not the general one. I don't
>> think that in `puts "hello, world"' you want the string to be
>> coupled to the object. Instead I think you'll want the coupling
>> to be as clear as possible to who reads the code, and both `x =
>> X.new(self)' and `x.parent = self' do this pretty good, don't
>> they?
> well, i just passed self, again. so imust ask you, how general is
> general? so far, just about every sizable script i write i end up
> passing self somewhere. "hello, world" is not a good example as it
> is an utterly useless program. useful programs are much more
> complex, where self passing is much more likely and useful.

> sure passing self isn't that bad. but i don't think accessing the
> creation-parent object is that uncommon.

In ten years of professional software development, a good chunk of
it doing OO, I have never had a contained class (the child) call a
method in the containing class (the parent).

-austin
-- Austin Ziegler, austin / halostatue.ca on 2002.07.05 at 18.10.13