Here's an article on it, from one of the Gang of Four:

http://www.artima.com/lejava/articles/designprinciples4.html

Richard







On Jun 23, 2009, at 12:13 PM, Kirk Cerny wrote:

I would still not write it this way, but good point Alvaro.

Kirk Cerny

On Tue, Jun 23, 2009 at 11:44 AM, Alvaro Carrasco<[email protected]> wrote:
I disagree. Having a child hold a reference to it's parent (in composition of course) is a very common approach in object-oriented programming. I don't think you have any problem with readability by doing that and I don't think
there's anything wrong with it at all.

Alvaro

Kirk Cerny wrote:

But in this case it appears that A has B and B has A.
I would be alright if it was just A has B.
The circular part is where I think you get into trouble especially
with readability, and understandable code.

Kirk Cerny



_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to