[fpc-devel] Circular references and forward declarations
Florian Klaempfl
florian at freepascal.org
Wed Jan 6 09:59:36 CET 2010
Nikolai ZHUBR schrieb:
> Tuesday, January 05, 2010, 11:08:37 PM, Juha Manninen wrote:
>> On tiistai, 5. tammikuuta 2010 20:06:42 Florian Klaempfl wrote:
>>> Then do the same as in C++ and put it in different include files.
>
>> Right, include files could solve this problem at least partly. They seem to be
>
> Curious enough, nobody even mentioned interfaced objects (interfaces),
> though they are available in both FPC and Delphi since ages.
>
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.
More information about the fpc-devel
mailing list