[fpc-devel] Circular references and forward declarations

Michael Van Canneyt michael at freepascal.org
Wed Jan 6 11:34:59 CET 2010

On Wed, 6 Jan 2010, Marco van de Voort wrote:

> In our previous episode, Juha Manninen said:
>>> - 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 never do this, there is no need. Probably similar to the fact that 90% of
> the Delphi programs have all important code in event handlers of the GUI
> components. That still doesn't make a good thing.

Glad you give this example. I try for years to convince my fellow
programmers that an event handler should contain at most 1 or 2 lines of
code: a call to a routine that does the actual work, and maybe some status
updating... But old habits die hard :-)


More information about the fpc-devel mailing list