Micha Nelissen wrote:

> The real question is: was the design of the code ok ?

Some dependencies cannot be removed by a redesign :-(

In some cases interfaces instead of classes can help, because they don't
need implementation in the same unit. But then the classes have to be
implemented as well.

IMO it's important to keep classes encapsulated in distinct units, so
that no unintended interaction (use of private/protected members of
other classes...) can occur, as is possible in a single unit.

> Circular references makes code harder to understand.
> Layers are easier to understand.

I see no problem in understanding here? When two objects refer to each
other, but the objects are not otherwise functionally related, they can
be understood without knowing about the other one. It also should be
possible to implement all these objects seaparately.

DoDi



_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to