From: Tom Sawyer Date: 2002-07-06T13:02:47+09:00 Subject: Re: self_parent okay, i grant you i write code very differently then most others. at least that has been my experience. i gerneally tend to hack something out and then go over it and over and over it again trying to reduce every little ounce of code reuse out of it that i can. i think if you saw some on my work you'd be very suprised at how little code there is and yet how much it does. so, when you appoach things in this way and you have a class inheritiing a class inherting a class and so on and those classes create other classes, to seperate logic from interface, for example, it has been my experience that child classes need to "talk" to their parents. i can provide some examples, but it won't be a tiny piece of code to easily paste in an email. and i think Michael, here, makes a good point: "I've passed self before, but I can't ever remember thinking it was a good idea." that's really where i'm coming from too. for i don't feel comfortable with passing self really. so either i'm not writing my code in the best manner or there really is a good reason to have this connection between the container and contained. adn yet i've i gone over some of my code angain and again. i it always seems the most effective means: passing self. perhaps i should just feel comfortable with passing self. that's fine. i'm not trying to push this or anything. i was curious to see what others thought. really, this conversation has me wondering what others might thing of my code. ~transami On Fri, 2002-07-05 at 16:35, Michael Campbell wrote: > > 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). > > > I can't think of an instance where I have either. I've passed self > before, but I can't ever remember thinking it was a good idea. > > > ===== > -- > Use your computer to help find a cure for cancer: http://members.ud.com/projects/cancer/ > > Yahoo IM: michael_s_campbell > > __________________________________________________ > Do You Yahoo!? > Sign up for SBC Yahoo! Dial - First Month Free > http://sbc.yahoo.com > -- ~transami "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin