Re: C++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux