[fpc-devel] Circular references and forward declarations

Juha Manninen juha.manninen at phnet.fi
Wed Jan 6 11:14:47 CET 2010


On keskiviikko, 6. tammikuuta 2010 10:59:36 Florian Klaempfl wrote:
> Indeed, there are multiple ways to prevent the hell of circular class
> references between units:
> - abstract base classes
> - interfases
> - include files
> - big units
> - type casting (in the worst case)
> - ...
> 
> The right choice depends on the application.

Abstract base classes and interfaces are recommended by many but actual 
projects end up copying everything into one file. Surprising... :-)

I must try include files for this problem sometimes. Does FPC really treat 
them differently than Delphi.

Juha Manninen



More information about the fpc-devel mailing list