[Lazarus] Circular references

Michael Van Canneyt michael at freepascal.org
Fri Aug 14 11:14:58 CEST 2009



On Fri, 14 Aug 2009, Graeme Geldenhuys wrote:

> Florian Klaempfl wrote:
>> 
>> Unit testing has nothing to do with pascal units and because a unit
>> as a namespace on it's own, it makes no sense to put only one or two
>> classes into one unit.
>
> It helps with the logical separation of classes, which in turn makes them 
> easier to unit test.

How does it help ? I fail to see that. Whether or not a class is in a
separate unit does not influence it's design at all IMHO. The editing
process may be easier as there is less code to browse through, but that's
about it.

> Plus you don't have the Private and Protected issues I mentioned before.

That one can be solved with the 'strict' clause. That would help, because you
cannot inadvertently use private/protected fields or methods of another
class, and thus compromise your OOP design.

Michael.




More information about the Lazarus mailing list