On Mon, 2003-02-24 at 09:35, Thomas Dodd wrote:
> I check the C++ books I had lying around and couldn't find forward 
> declaration.
> 
> After the mention here, I was looking at some other code and saw it used.
> Now, why didn't I see that in the code before? :(

Because an important aspect of good OO design is to keep classes as
loosely coupled as possible.  Having two classes directly reference each
other like you described indicates a potential refactoring may be
needed.  

A good book to consider reading is "Pattern Hatching" by John Vlissides;
his initial example of designing an OO filesystem abstraction sounds
very similar to what your example was trying to solve, only he
demonstrates several ways that design can be improved and why those
changes are necessary.

Tom



-- 
Psyche-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/psyche-list

Reply via email to