[lazarus] Circle dependencies in the lcl
nc-gaertnma at netcologne.de
Mon Jan 15 10:25:10 EST 2001
I want to discuss a structure problem in the LCL.
This is nothing new:
There some circle dependencies in the LCL. For example
Although the compiler can handle this, there are some problems. Some weeks
ago this was hidden with funny tricks like "make -C lcl" 6 times. Then a new
trick was invented: -Ca. AFAIK this prevents some optimization.
I believe it is bad coding to program circle dependencies. A circle is an
important sign that code should be gathered in one unit.
graphics.pp <-> controls.pp
Even Delphi avoids this. This circle can easily be destroyed.
Move the procedure CN_SendMessage from
controls.pp to lmessages.pp.
controls <-> dialogs
Why does controls depend on dialogs?
forms.pp <-> controls.pp
Delphi has the same problem. The LCL should be
very similar to the VCL, but of course we don't
want to copy the problems, do we?
The dependency is TWinControl<->TCustomForm.
To distribute them to two units is a design
What do you think?
More information about the Lazarus